Extending Qt Creator Manual | QtcProcess

Extending Qt Creator Manual 4.6.0

# QtcProcess Class

(Utils::QtcProcess)

The QtcProcess class provides functionality for dealing with shell-quoted process arguments. More...

Header: | #include <QtcProcess>

- List of all members, including inherited members

## Public Types

class | Arguments
class | ConstArgIterator
enum | SplitError { SplitOk, BadQuoting, FoundMeta }

## Public Functions

| QtcProcess(QObject *parent = 0)
void | interrupt()
void | setCommand(const QString &command, const QString &arguments)
void | setEnvironment(const Environment &env)
void | setUseCtrlCStub(bool enabled)
void | start()
void | terminate()

## Static Public Members

void | addArg(QString *args, const QString &arg, OsType osType = HostOsInfo::hostOs())
void | addArgs(QString *args, const QStringList &inArgs)
void | addArgs(QString *args, const QString &inArgs)
bool | expandMacros(QString *cmd, AbstractMacroExpander *mx, OsType osType = HostOsInfo::hostOs())
QString | expandMacros(const QString &str, AbstractMacroExpander *mx, OsType osType = HostOsInfo::hostOs())
QString | joinArgs(const QStringList &args, OsType osType = HostOsInfo::hostOs())
Arguments | prepareArgs(const QString &cmd, SplitError *err, OsType osType = HostOsInfo::hostOs(), const Environment *env = 0, const QString *pwd = 0)
bool | prepareCommand(const QString &command, const QString &arguments, QString *outCmd, Arguments *outArgs, OsType osType = HostOsInfo::hostOs(), const Environment *env = 0, const QString *pwd = 0)
QString | quoteArg(const QString &arg, OsType osType = HostOsInfo::hostOs())
QString | quoteArgUnix(const QString &arg)
QStringList | splitArgs(const QString &cmd, OsType osType = HostOsInfo::hostOs(), bool abortOnMeta = false, SplitError *err = 0, const Environment *env = 0, const QString *pwd = 0)

## Detailed Description

The QtcProcess class provides functionality for dealing with shell-quoted process arguments.

## Member Type Documentation

### enum QtcProcess::SplitError

## Member Function Documentation

### QtcProcess::QtcProcess(QObject *parent = 0)

Default constructs an instance of QtcProcess.

### `[static]` void QtcProcess::addArg(QString *args, const QString &arg, OsType osType = HostOsInfo::hostOs())

### `[static]` void QtcProcess::addArgs(QString *args, const QStringList &inArgs)

### `[static]` void QtcProcess::addArgs(QString *args, const QString &inArgs)

### `[static]` bool QtcProcess::expandMacros(QString *cmd, AbstractMacroExpander *mx, OsType osType = HostOsInfo::hostOs())

### `[static]` QString QtcProcess::expandMacros(const QString &str, AbstractMacroExpander *mx, OsType osType = HostOsInfo::hostOs())

### void QtcProcess::interrupt()

### `[static]` QString QtcProcess::joinArgs(const QStringList &args, OsType osType = HostOsInfo::hostOs())

### `[static]` Arguments QtcProcess::prepareArgs(const QString &cmd, SplitError *err, OsType osType = HostOsInfo::hostOs(), const Environment *env = 0, const QString *pwd = 0)

### `[static]` bool QtcProcess::prepareCommand(const QString &command, const QString &arguments, QString *outCmd, Arguments *outArgs, OsType osType = HostOsInfo::hostOs(), const Environment *env = 0, const QString *pwd = 0)

### `[static]` QString QtcProcess::quoteArg(const QString &arg, OsType osType = HostOsInfo::hostOs())

### `[static]` QString QtcProcess::quoteArgUnix(const QString &arg)

### void QtcProcess::setCommand(const QString &command, const QString &arguments)

### void QtcProcess::setEnvironment(const Environment &env)

### void QtcProcess::setUseCtrlCStub(bool enabled)

### `[static]` QStringList QtcProcess::splitArgs(const QString &cmd, OsType osType = HostOsInfo::hostOs(), bool abortOnMeta = false, SplitError *err = 0, const Environment *env = 0, const QString *pwd = 0)

### void QtcProcess::start()

### void QtcProcess::terminate()