diff --git a/tests/benchmarks/corelib/tools/qdatetime/main.cpp b/tests/benchmarks/corelib/tools/qdatetime/main.cpp index 1eb423c8e7..34815af646 100644 --- a/tests/benchmarks/corelib/tools/qdatetime/main.cpp +++ b/tests/benchmarks/corelib/tools/qdatetime/main.cpp @@ -48,7 +48,11 @@ class tst_QDateTime : public QObject { Q_OBJECT - enum { + enum +#if defined(Q_COMPILER_CLASS_ENUM) || (defined(Q_CC_MSVC) && _MSC_VER >= 1700) + : qint64 +#endif + { SECS_PER_DAY = 86400, MSECS_PER_DAY = 86400000, JULIAN_DAY_1950 = 2433283, diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp index 4b2781e9ea..a6f144ea8a 100644 --- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp @@ -1290,7 +1290,7 @@ void tst_QPainter::drawScaledAntialiasedRoundedRect_data() { QTest::addColumn("scale"); - for (float i = 0; i < 3; i += .1) + for (float i = 0; i < 3; i += .1f) QTest::newRow(QString(QLatin1String("scale=%1")).arg(i).toLatin1()) << i; } @@ -1471,7 +1471,7 @@ void tst_QPainter::drawScaledBorderPixmapRoundedRect_data() QTest::addColumn("scale"); QTest::addColumn("imageType"); - for (float i = 0; i < 3; i += .1) + for (float i = 0; i < 3; i += .1f) QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB32_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB32_Premultiplied; //for (float i = 0; i < 3; i += .1) // QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied; diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp index 823eb404e2..e17f8c6436 100644 --- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp +++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp @@ -152,7 +152,7 @@ private slots: QString makeString(int length) { const char chars[] = "abcd efgh ijkl mnop qrst uvwx yz!$. ABCD 1234"; - int len = strlen(chars); + const int len = int(strlen(chars)); QString ret; for (int j = 0; j < length; j++) { diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp index f7515abd89..7df8e9407a 100644 --- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp +++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp @@ -66,6 +66,7 @@ private: void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm ) { int fontHeight = fm.height(); + Q_UNUSED(fontHeight) } void tst_QFontMetrics::fontmetrics_create()