aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-11 15:21:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-12 11:38:18 +0000
commitf783ab6049774888308e24bf6e4218a7035a4d12 (patch)
tree70328085ea8995193ae7cc15a52e29624e82bf78 /tests/auto/quick
parentce452b70e158461b021aa47faf5cce87964b6cf7 (diff)
Fix warnings about lossy double/float conversion in tests
QColor operates on floats, not qreal or double, so explicitly use float literals in test code. Change-Id: I6f0cb56e861b4812fc79ce67ade9abe3ee9dfddc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> (cherry picked from commit 8bb955e22f027fc3fd9402383445685cb4185744) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index fe366d0f34..072fe38f80 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -217,7 +217,7 @@ void tst_qquickanimations::simpleColor()
QVERIFY(animation.isPaused());
animation.setCurrentTime(125);
QCOMPARE(animation.currentTime(), 125);
- QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
+ QCOMPARE(rect.color(), QColor::fromRgbF(0.498039f, 0, 0.498039f, 1));
rect.setColor(QColor("green"));
animation.setFrom(QColor("blue"));
@@ -228,7 +228,7 @@ void tst_qquickanimations::simpleColor()
QCOMPARE(rect.color(), QColor("blue"));
QVERIFY(animation.isRunning());
animation.setCurrentTime(125);
- QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
+ QCOMPARE(rect.color(), QColor::fromRgbF(0.498039f, 0, 0.498039f, 1));
}
void tst_qquickanimations::simpleRotation()