aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-11 15:21:41 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-12 10:39:02 +0200
commit8bb955e22f027fc3fd9402383445685cb4185744 (patch)
treeec8333a078c39a07b853c9a52a7b93107d1560e9 /tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
parent506463fe8ae0125f18d6236db9b7cd8b99885d08 (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. Pick-to: 6.1 Change-Id: I6f0cb56e861b4812fc79ce67ade9abe3ee9dfddc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypeproviders/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlvaluetypeproviders/testtypes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
index 5241381336..8a1e3615da 100644
--- a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
+++ b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
@@ -95,10 +95,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;