summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@nokia.com>2011-06-03 15:55:09 (GMT)
committerChristian Strømme <christian.stromme@nokia.com>2011-07-07 11:02:27 (GMT)
commit999047177846695a809aa1a730330ce676d85959 (patch)
treee6af2dff2c13f4a75a17019a01116721f3e44444 /src/corelib
parentf650c43d130d28fa7eca2f6accf8aacd76ae508d (diff)
downloadQt-999047177846695a809aa1a730330ce676d85959.zip
Qt-999047177846695a809aa1a730330ce676d85959.tar.gz
Qt-999047177846695a809aa1a730330ce676d85959.tar.bz2
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-on: http://codereview.qt.nokia.com/331 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com> (cherry picked from commit 883b120d2f39c532cdd1a98d962af83be5adc4bd)
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qprocess.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 4b689c5..e900663 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1683,13 +1683,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