summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qfutureinterface.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-03-01 23:26:13 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-03-01 23:26:13 (GMT)
commit95814418f9d6adeba365c795462e8afb00138211 (patch)
treef7528ae97d136474ae300daa513acc0250f02d4e /src/corelib/concurrent/qfutureinterface.cpp
parent88253db8a7d7910e1393b1948fb3747117538c92 (diff)
parent119a8ddcd7c8de0607309b37f9ef83439b607f17 (diff)
downloadQt-95814418f9d6adeba365c795462e8afb00138211.zip
Qt-95814418f9d6adeba365c795462e8afb00138211.tar.gz
Qt-95814418f9d6adeba365c795462e8afb00138211.tar.bz2
Merge branch '4.7' into qtquick11
Conflicts: src/declarative/graphicsitems/qdeclarativelistview.cpp Change-Id: Ic21311365c6139520ae337a379bdedb6ffe497db
Diffstat (limited to 'src/corelib/concurrent/qfutureinterface.cpp')
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp9
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;
}