diff options
author | Christian Strømme <christian.stromme@nokia.com> | 2011-06-03 17:55:09 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-20 14:13:17 +0200 |
commit | 883b120d2f39c532cdd1a98d962af83be5adc4bd (patch) | |
tree | d91784664b645f94de86f5d3a3c52dfd889c0427 /src/corelib/io/qprocess.cpp | |
parent | 18eb310d5bcbc4193bef0a5d45c01ed10f46579e (diff) |
Fix QProcess emitting two started signals on X11
On X11 QProcess would emit two started signals when calling
QProcess::waitForStarted(). We should expect that the private
implementation of waitForStarted() should emit the started signal
and return true or false appropriately.
Task-number: QTBUG-7039
Change-Id: I3d381399ab7a39bf57db03a110fa6747a4fc6a24
Reviewed-by: pending
Reviewed-on: http://codereview.qt.nokia.com/331
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 70a70c27d8..af43ab7320 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1673,13 +1673,10 @@ QProcessEnvironment QProcess::processEnvironment() const bool QProcess::waitForStarted(int msecs) { Q_D(QProcess); - if (d->processState == QProcess::Starting) { - if (!d->waitForStarted(msecs)) - return false; - setProcessState(QProcess::Running); - emit started(); - } - return d->processState == QProcess::Running; + if (d->processState == QProcess::Running) + return true; + + return d->waitForStarted(msecs); } /*! \reimp |