diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-03-16 08:44:44 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-03-16 08:44:44 (GMT) |
commit | 245e0454a82a0fba7a1605320acf6b231c8d4205 (patch) | |
tree | 8e1ccd930b22a82c45e77b452bb5f0a230c499d1 /src/corelib/concurrent/qfutureinterface.cpp | |
parent | 517290f73be74d1cf08fbd603870d3dacc379ff3 (diff) | |
parent | b18bd68dd05f000c65e33a975bca6bf24dabb8d3 (diff) | |
download | Qt-245e0454a82a0fba7a1605320acf6b231c8d4205.zip Qt-245e0454a82a0fba7a1605320acf6b231c8d4205.tar.gz Qt-245e0454a82a0fba7a1605320acf6b231c8d4205.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team into 4.7
Diffstat (limited to 'src/corelib/concurrent/qfutureinterface.cpp')
-rw-r--r-- | src/corelib/concurrent/qfutureinterface.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp index 6256944..627d0c7 100644 --- a/src/corelib/concurrent/qfutureinterface.cpp +++ b/src/corelib/concurrent/qfutureinterface.cpp @@ -421,9 +421,11 @@ bool QFutureInterfaceBase::referenceCountIsOne() const QFutureInterfaceBasePrivate::QFutureInterfaceBasePrivate(QFutureInterfaceBase::State initialState) : refCount(1), m_progressValue(0), m_progressMinimum(0), m_progressMaximum(0), - state(initialState), progressTimeStarted(false), pendingResults(0), + state(initialState), pendingResults(0), manualProgress(false), m_expectedResultCount(0), runnable(0) -{ } +{ + progressTime.invalidate(); +} int QFutureInterfaceBasePrivate::internal_resultCount() const { @@ -455,12 +457,11 @@ bool QFutureInterfaceBasePrivate::internal_updateProgress(int progress, m_progressValue = progress; m_progressText = progressText; - if (progressTimeStarted == true && m_progressValue != m_progressMaximum) // make sure the first and last steps are emitted. + if (progressTime.isValid() && m_progressValue != m_progressMaximum) // make sure the first and last steps are emitted. if (progressTime.elapsed() < (1000 / MaxProgressEmitsPerSecond)) return false; progressTime.start(); - progressTimeStarted = true; return true; } |