diff options
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r-- | tests/auto/corelib/global/qflags/qflags.pro | 4 | ||||
-rw-r--r-- | tests/auto/corelib/global/qglobal/tst_qglobal.cpp | 16 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/test/test.pro | 4 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 4 | ||||
-rw-r--r-- | tests/auto/corelib/global/qtendian/qtendian.pro | 4 |
5 files changed, 14 insertions, 18 deletions
diff --git a/tests/auto/corelib/global/qflags/qflags.pro b/tests/auto/corelib/global/qflags/qflags.pro index 29dfb0684c..c3c11fa81b 100644 --- a/tests/auto/corelib/global/qflags/qflags.pro +++ b/tests/auto/corelib/global/qflags/qflags.pro @@ -2,5 +2,5 @@ CONFIG += testcase TARGET = tst_qflags QT = core testlib SOURCES = tst_qflags.cpp -contains(QT_CONFIG, c++11): CONFIG += c++11 -contains(QT_CONFIG, c++14): CONFIG += c++14 +qtConfig(c++11): CONFIG += c++11 +qtConfig(c++14): CONFIG += c++14 diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index bb4d1f4bf2..9b92a4ff15 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -81,7 +81,7 @@ void tst_QGlobal::qIsNull() void tst_QGlobal::for_each() { - QList<int> list; + QVector<int> list; list << 0 << 1 << 2 << 3 << 4 << 5; int counter = 0; @@ -100,7 +100,7 @@ void tst_QGlobal::for_each() // check whether we can pass a constructor as container argument counter = 0; - foreach (int i, QList<int>(list)) { + foreach (int i, QVector<int>(list)) { QCOMPARE(i, counter++); } QCOMPARE(counter, list.count()); @@ -589,7 +589,7 @@ Q_DECLARE_METATYPE(stringpair) void tst_QGlobal::qprintable() { - QFETCH(QList<stringpair>, localestrings); + QFETCH(QVector<stringpair>, localestrings); QFETCH(int, utf8index); QVERIFY(utf8index >= 0 && utf8index < localestrings.count()); @@ -600,21 +600,21 @@ void tst_QGlobal::qprintable() QString string = QString::fromUtf8(utf8string); - foreach (const stringpair &pair, localestrings) { + for (const stringpair &pair : qAsConst(localestrings)) { QTextCodec *codec = QTextCodec::codecForName(pair.first); if (!codec) continue; QTextCodec::setCodecForLocale(codec); // test qPrintable() QVERIFY(qstrcmp(qPrintable(string), pair.second) == 0); - foreach (const stringpair &pair2, localestrings) { + for (const stringpair &pair2 : qAsConst(localestrings)) { if (pair2.second == pair.second) continue; QVERIFY(qstrcmp(qPrintable(string), pair2.second) != 0); } // test qUtf8Printable() QVERIFY(qstrcmp(qUtf8Printable(string), utf8string) == 0); - foreach (const stringpair &pair2, localestrings) { + for (const stringpair &pair2 : qAsConst(localestrings)) { if (qstrcmp(pair2.second, utf8string) == 0) continue; QVERIFY(qstrcmp(qUtf8Printable(string), pair2.second) != 0); @@ -626,7 +626,7 @@ void tst_QGlobal::qprintable() void tst_QGlobal::qprintable_data() { - QTest::addColumn<QList<stringpair> >("localestrings"); + QTest::addColumn<QVector<stringpair> >("localestrings"); QTest::addColumn<int>("utf8index"); // index of utf8 string // Unicode: HIRAGANA LETTER A, I, U, E, O (U+3442, U+3444, U+3446, U+3448, U+344a) @@ -634,7 +634,7 @@ void tst_QGlobal::qprintable_data() static const char *const eucjpstring = "\xa4\xa2\xa4\xa4\xa4\xa6\xa4\xa8\xa4\xaa"; static const char *const sjisstring = "\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8"; - QList<stringpair> japanesestrings; + QVector<stringpair> japanesestrings; japanesestrings << stringpair("UTF-8", utf8string) << stringpair("EUC-JP", eucjpstring) << stringpair("Shift_JIS", sjisstring); diff --git a/tests/auto/corelib/global/qlogging/test/test.pro b/tests/auto/corelib/global/qlogging/test/test.pro index b5b75be3a6..93eee7307a 100644 --- a/tests/auto/corelib/global/qlogging/test/test.pro +++ b/tests/auto/corelib/global/qlogging/test/test.pro @@ -1,7 +1,7 @@ CONFIG += testcase CONFIG -= app_bundle debug_and_release_target -contains(QT_CONFIG, c++11): CONFIG += c++11 -contains(QT_CONFIG, c++14): CONFIG += c++14 +qtConfig(c++11): CONFIG += c++11 +qtConfig(c++14): CONFIG += c++14 TARGET = ../tst_qlogging QT = core testlib SOURCES = ../tst_qlogging.cpp diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index ce227a6c8b..c2d7338042 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -30,7 +30,7 @@ #include <qdebug.h> #include <qglobal.h> #include <QtCore/QProcess> -#include <QtTest/QtTest> +#include <QtTest/QTest> class tst_qmessagehandler : public QObject { @@ -841,7 +841,7 @@ void tst_qmessagehandler::qMessagePattern() QVERIFY(!output.isEmpty()); QCOMPARE(!output.contains("QT_MESSAGE_PATTERN"), valid); - foreach (const QByteArray &e, expected) { + for (const QByteArray &e : qAsConst(expected)) { if (!output.contains(e)) { qDebug() << output; qDebug() << "expected: " << e; diff --git a/tests/auto/corelib/global/qtendian/qtendian.pro b/tests/auto/corelib/global/qtendian/qtendian.pro index 2b0af4fa4c..214c706ca5 100644 --- a/tests/auto/corelib/global/qtendian/qtendian.pro +++ b/tests/auto/corelib/global/qtendian/qtendian.pro @@ -2,7 +2,3 @@ CONFIG += testcase TARGET = tst_qtendian QT = core testlib SOURCES = tst_qtendian.cpp -wince* { # QTBUG-37194 , internal compiler errors with MSVC2008 for Windows CE - QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE -= -O2 -} |