#include <HelperProcess.h>
Signals | |
void | startFailed (const QString &errorMessage) |
Public Member Functions | |
HelperProcess (QObject *parent=0) | |
void | start (const QString &app, const QString &args) |
void | start (const QString &app, const QStringList &args) |
bool | isDone () const |
Private Slots | |
void | onError (QProcess::ProcessError error) |
void | onReadyReadStandardError () |
void | onReadyReadStandardOutput () |
Private Attributes | |
QString | _processName |
Definition at line 47 of file HelperProcess.h.
HelperProcess::HelperProcess | ( | QObject * | parent = 0 |
) |
Default constructor
Definition at line 51 of file HelperProcess.cpp.
References tc::error(), onError(), onReadyReadStandardError(), and onReadyReadStandardOutput().
bool HelperProcess::isDone | ( | ) | const |
Returns true iff process is not running.
Definition at line 130 of file HelperProcess.cpp.
Referenced by MainWindow::onSubprocessFinished().
void HelperProcess::onError | ( | QProcess::ProcessError | error | ) | [private, slot] |
Invoked when underlying QProcess fails.
Definition at line 118 of file HelperProcess.cpp.
References _processName, startFailed(), and vWarn.
Referenced by HelperProcess().
void HelperProcess::onReadyReadStandardError | ( | ) | [private, slot] |
Invoked when output is written to the process's stderr.
Definition at line 67 of file HelperProcess.cpp.
References _processName, and vInfo.
Referenced by HelperProcess().
void HelperProcess::onReadyReadStandardOutput | ( | ) | [private, slot] |
Invoked when output is written to the process's stdout.
Definition at line 77 of file HelperProcess.cpp.
References _processName, and vInfo.
Referenced by HelperProcess().
void HelperProcess::start | ( | const QString & | app, | |
const QStringList & | args | |||
) |
Start the specified application.
Definition at line 102 of file HelperProcess.cpp.
References _processName, start(), string_format_arguments(), and vNotice.
void HelperProcess::start | ( | const QString & | app, | |
const QString & | args | |||
) |
Start app with args appended to the end of the command line. app will be quoted, so an executable name with spaces is acceptable.
Definition at line 86 of file HelperProcess.cpp.
References _processName, and vNotice.
Referenced by MainWindow::launchBrowserFromDirectory(), start(), MainWindow::startProxy(), and MainWindow::startSubprocesses().
void HelperProcess::startFailed | ( | const QString & | errorMessage | ) | [signal] |
QString HelperProcess::_processName [private] |
Definition at line 76 of file HelperProcess.h.
Referenced by onError(), onReadyReadStandardError(), onReadyReadStandardOutput(), and start().