From 453e4da6d1c2b5e8212ef9c5f0c68471e9c81d08 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 17 Apr 2013 16:05:24 +0300 Subject: [PATCH] Fix qgraphicsview autotest build for WEC7. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit logicalDotsPerInchX returns qreal, and qreal in WEC7 is defined to float instead double. There is no required overload: qFuzzyCompare(float,double) And for that reason build fails. Ensure qreal is casted to double which is default type used by compilers for floating point literals such as '96.0'. Change-Id: I24c701715b3dcf1a2137256a1c251c19d0c1dbe9 Reviewed-by: Björn Breitmeyer Reviewed-by: Friedemann Kleint Reviewed-by: Andreas Holzammer --- .../widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp index eebfdfac65..e215fd1086 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp @@ -661,7 +661,7 @@ void _scrollBarRanges_data() } const QScreen *screen = QGuiApplication::primaryScreen(); - if (screen && qFuzzyCompare(screen->logicalDotsPerInchX(), 96.0)) { + if (screen && qFuzzyCompare((double)screen->logicalDotsPerInchX(), 96.0)) { _scrollBarRanges_addTestData(QString("motif"), false); _scrollBarRanges_addTestData(QString("motif"), true); }