summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-12-09 15:46:41 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-12-09 15:55:10 +1000
commitc44f142cedf847bfb676eb70cb52f61a6c6ba232 (patch)
treec9acff738142d78bdf68a7eb5489a017d6dfd4ab /src/corelib
parentaf9304af3c462e120373f864d637e9c1db0787e2 (diff)
downloadqt4-tools-c44f142cedf847bfb676eb70cb52f61a6c6ba232.tar.gz
Fixed (unstable) tst_QTimeLine::currentTime test failure
Use qFuzzyCompare instead of an exact floating point comparison when checking if valueChanged should be emitted. Task-number: QTBUG-6189 Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qtimeline.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index cd3483daa0..ce49e3f1fa 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -125,7 +125,7 @@ void QTimeLinePrivate::setCurrentTime(int msecs)
#ifdef QTIMELINE_DEBUG
qDebug() << "QTimeLinePrivate::setCurrentTime: frameForTime" << currentTime << currentFrame;
#endif
- if (lastValue != q->currentValue())
+ if (!qFuzzyCompare(lastValue, q->currentValue()))
emit q->valueChanged(q->currentValue());
if (lastFrame != currentFrame) {
const int transitionframe = (direction == QTimeLine::Forward ? endFrame : startFrame);