CommandLine Class Reference

Class used for manipulating command line as it should appear in shell or cmd prompt. More...

#include <commandline.h>

Static Public Member Functions

static void escapeArg (QString &arg)
 Escapes all characters in the passed string. More...
 
static void escapeArgs (QStringList &args)
 Escapes all characters in all strings on the list. More...
 
static void escapeExecutable (QString &arg)
 Escapes the executable path and handles OS X bundles. More...
 

Detailed Description

Class used for manipulating command line as it should appear in shell or cmd prompt.

This can be used to escape command line arguments in a way that they are ready to be copied by the user and pasted into the cmd line prompt.

Definition at line 37 of file commandline.h.

Member Function Documentation

void CommandLine::escapeArg ( QString &  arg)
static

Escapes all characters in the passed string.

The string is modified directly.

The function behaves differently depending on the OS the program was compiled for.

Definition at line 61 of file commandline.cpp.

void CommandLine::escapeArgs ( QStringList &  args)
static

Escapes all characters in all strings on the list.

The passed list is modified directly. No elements are added or removed but the existing elements may change.

The function behaves differently depending on the OS the program was compiled for.

Definition at line 29 of file commandline.cpp.

void CommandLine::escapeExecutable ( QString &  arg)
static

Escapes the executable path and handles OS X bundles.

Definition at line 72 of file commandline.cpp.


The documentation for this class was generated from the following files: