diff options
Diffstat (limited to 'tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index 621b5811f9..f9ce7425f6 100644 --- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp +++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp @@ -87,8 +87,7 @@ private slots: void fromRawData_data(); void fromRawData(); void literals(); -#if defined(Q_COMPILER_VARIADIC_MACROS) \ - && (defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU)) +#if defined(Q_COMPILER_VARIADIC_MACROS) && defined(Q_COMPILER_LAMBDA) void variadicLiterals(); #endif #ifdef Q_COMPILER_RVALUE_REFS @@ -469,7 +468,7 @@ void tst_QArrayData::simpleVector() for (int i = 0; i < 60; ++i) QCOMPARE(v1[i], v8[i % 10]); - v1.insert(v1.size(), v6.constBegin(), v6.constEnd()); + v1.insert(int(v1.size()), v6.constBegin(), v6.constEnd()); // v1 is now [ 0..9 x 6, <new data>0..9 x 3</new data> ] QCOMPARE(v1.size(), size_t(90)); @@ -1235,7 +1234,7 @@ void tst_QArrayData::arrayOps2() vo.resize(10); for (size_t i = 7; i < 10; ++i) { - vi[i] = i; + vi[i] = int(i); vs[i] = QString::number(i); QCOMPARE(vo[i].id, i); @@ -1555,8 +1554,7 @@ void tst_QArrayData::literals() QCOMPARE(v.size(), size_t(11)); // v.capacity() is unspecified, for now -#if defined(Q_COMPILER_VARIADIC_MACROS) \ - && (defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU)) +#if defined(Q_COMPILER_VARIADIC_MACROS) && defined(Q_COMPILER_LAMBDA) QVERIFY(v.isStatic()); #endif @@ -1569,8 +1567,7 @@ void tst_QArrayData::literals() } } -#if defined(Q_COMPILER_VARIADIC_MACROS) \ - && (defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU)) +#if defined(Q_COMPILER_VARIADIC_MACROS) && defined(Q_COMPILER_LAMBDA) // Variadic Q_ARRAY_LITERAL need to be available in the current configuration. void tst_QArrayData::variadicLiterals() { @@ -1727,7 +1724,7 @@ void tst_QArrayData::grow() // Going element-wise is slow under valgrind if (previousCapacity - i > 10) { i = previousCapacity - 5; - vector.back() = -i; + vector.back() = -int(i); vector.resize(i); // It's still not the time to re-allocate |