From c44f142cedf847bfb676eb70cb52f61a6c6ba232 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 9 Dec 2009 15:46:41 +1000 Subject: 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 --- src/corelib/tools/qtimeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') 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); -- cgit v1.2.1