forked from qt-creator/qt-creator
Utils: Introduce a QtcProcess::startDetached
A convenience wrapper around QProcess::startDetached(). Change-Id: If4228e8405ad4d5e172930593a6f670874211767 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -645,6 +645,14 @@ void QtcProcess::interrupt()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QtcProcess::startDetached(const CommandLine &cmd, const FilePath &workingDirectory, qint64 *pid)
|
||||
{
|
||||
return QProcess::startDetached(cmd.executable().toUserOutput(),
|
||||
cmd.splitArguments(),
|
||||
workingDirectory.toUserOutput(),
|
||||
pid);
|
||||
}
|
||||
|
||||
void QtcProcess::setLowPriority()
|
||||
{
|
||||
d->m_process->setLowPriority();
|
||||
|
||||
@@ -109,6 +109,8 @@ public:
|
||||
void terminate();
|
||||
void interrupt();
|
||||
|
||||
static bool startDetached(const CommandLine &cmd, const FilePath &workingDirectory,
|
||||
qint64 *pid = nullptr);
|
||||
// Starts the command and waits for finish. User input processing depends
|
||||
// on whether setProcessUserEventWhileRunning was called.
|
||||
void runBlocking();
|
||||
|
||||
Reference in New Issue
Block a user