diff options
Diffstat (limited to 'tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp index a1d0100f96..74654a3862 100644 --- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp +++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp @@ -448,11 +448,11 @@ QT_END_NAMESPACE bool reallocTestProceed = true; -template <class T, int PreAlloc> -int countMoved(QVarLengthArray<T, PreAlloc> const &c) +template <class T, qsizetype PreAlloc> +qsizetype countMoved(QVarLengthArray<T, PreAlloc> const &c) { - int result = 0; - for (int i = 0; i < c.size(); ++i) + qsizetype result = 0; + for (qsizetype i = 0; i < c.size(); ++i) if (c[i].hasMoved()) ++result; @@ -827,7 +827,7 @@ void tst_QVarLengthArray::operators() // +=: not provided, emulate //myvla += myvlatwo; - Q_FOREACH (const QString &s, myvlatwo) + for (const QString &s : qAsConst(myvlatwo)) myvla.push_back(s); QCOMPARE(myvla, combined); |