summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-12-09 05:46:41 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-12-09 05:55:10 (GMT)
commitc44f142cedf847bfb676eb70cb52f61a6c6ba232 (patch)
treec9acff738142d78bdf68a7eb5489a017d6dfd4ab /src/corelib
parentaf9304af3c462e120373f864d637e9c1db0787e2 (diff)
downloadQt-c44f142cedf847bfb676eb70cb52f61a6c6ba232.zip
Qt-c44f142cedf847bfb676eb70cb52f61a6c6ba232.tar.gz
Qt-c44f142cedf847bfb676eb70cb52f61a6c6ba232.tar.bz2
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 cd3483d..ce49e3f 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);