aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypes/testtypes.h
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/qml/qqmlvaluetypes/testtypes.h
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/qml/qqmlvaluetypes/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlvaluetypes/testtypes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/testtypes.h b/tests/auto/qml/qqmlvaluetypes/testtypes.h
index 5b1b3ce7fd..8ea2e68260 100644
--- a/tests/auto/qml/qqmlvaluetypes/testtypes.h
+++ b/tests/auto/qml/qqmlvaluetypes/testtypes.h
@@ -103,10 +103,10 @@ public:
m_font.setCapitalization(QFont::AllLowercase);
m_font.setLetterSpacing(QFont::AbsoluteSpacing, 10.2);
m_font.setWordSpacing(19.7);
- m_color.setRedF(0.2);
- m_color.setGreenF(0.88);
- m_color.setBlueF(0.6);
- m_color.setAlphaF(0.34);
+ m_color.setRedF(0.2f);
+ m_color.setGreenF(0.88f);
+ m_color.setBlueF(0.6f);
+ m_color.setAlphaF(0.34f);
}
QPoint m_point;