forked from qt-creator/qt-creator
Utils: Add a synchronous property to QtcProcess interface
Use it to avoid IDevice interface clutter. Change-Id: I4a04f04e2c343593d937a402060e56ef94fcabf1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -763,6 +763,9 @@ void QtcProcess::start()
|
||||
}
|
||||
QProcess::start(command, arguments.toUnixArgs());
|
||||
}
|
||||
|
||||
if (m_synchronous)
|
||||
QProcess::waitForFinished();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -1262,6 +1265,16 @@ void QtcProcess::setupChildProcess_impl()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QtcProcess::isSynchronous() const
|
||||
{
|
||||
return m_synchronous;
|
||||
}
|
||||
|
||||
void QtcProcess::setSynchronous(bool on)
|
||||
{
|
||||
m_synchronous = on;
|
||||
}
|
||||
|
||||
bool QtcProcess::ArgIterator::next()
|
||||
{
|
||||
// We delay the setting of m_prev so we can still delete the last argument
|
||||
|
||||
Reference in New Issue
Block a user