From 31e782cc9609c2f1c201453841f36ed7dae25890 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 30 May 2016 17:22:05 +0200 Subject: Add non-static QProcess::startDetached The three static QProcess::startDetached overloads support a limited number of features: program, arguments and working directory. To support more features of QProcess (without adding a plethora of overloads) we add a non-static method startDetached that can be used as follows: QProcess p; p.setProgram("cat"); p.setArguments("meow"); p.setWorkingDirectory("/tmp"); if (!p.startDetached()) qWarning("Cannot start process."); We plan to add support for nativeArguments, processEnvironment, standard{Output|Error}File and maybe more in subsequent commits. [ChangeLog][QtCore][QProcess] Added non-static QProcess::startDetached to support more features for detached processes. Task-number: QTBUG-2058 Task-number: QTBUG-2284 Task-number: QTBUG-37656 Task-number: QTBUG-52405 Task-number: QTBUG-57687 Change-Id: If6fdd57ecb28cd13aa5fff566216a4177f81d339 Reviewed-by: Thiago Macieira Reviewed-by: Rafael Roquetto --- src/corelib/io/qprocess_p.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/corelib/io/qprocess_p.h') diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 6e0630eb66..9c4a2d8e1b 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -368,8 +368,7 @@ public: qint64 pipeWriterBytesToWrite() const; #endif - static bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory = QString(), - qint64 *pid = 0); + bool startDetached(qint64 *pPid); int exitCode; QProcess::ExitStatus exitStatus; -- cgit v1.2.3