From 26b1cf2bbaa5a847f8b03137f666b7f32b16d843 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 25 Feb 2020 17:19:30 +0100 Subject: QMake: Use Qt::SplitBehavior in preference to QString::SplitBehavior The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I3f1b836cfb47bba0fdc27f2c3aa7b0576d123dca Reviewed-by: Lars Knoll --- tests/auto/tools/qmakelib/evaltest.cpp | 2 +- tests/auto/tools/qmakelib/parsertest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/tools') diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp index 948e2b3121..3a01590707 100644 --- a/tests/auto/tools/qmakelib/evaltest.cpp +++ b/tests/auto/tools/qmakelib/evaltest.cpp @@ -2859,7 +2859,7 @@ void tst_qmakelib::proEval() QString infile = m_indir + "/test.pro"; bool verified = true; QMakeTestHandler handler; - handler.setExpectedMessages(msgs.replace("##:", infile + ':').split('\n', QString::SkipEmptyParts)); + handler.setExpectedMessages(msgs.replace("##:", infile + ':').split('\n', Qt::SkipEmptyParts)); QMakeVfs vfs; ProFileCache cache; QMakeParser parser(&cache, &vfs, &handler); diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp index f736bf38bf..b57ea75c34 100644 --- a/tests/auto/tools/qmakelib/parsertest.cpp +++ b/tests/auto/tools/qmakelib/parsertest.cpp @@ -2028,7 +2028,7 @@ void tst_qmakelib::proParser() bool verified = true; QMakeTestHandler handler; - handler.setExpectedMessages(msgs.split('\n', QString::SkipEmptyParts)); + handler.setExpectedMessages(msgs.split('\n', Qt::SkipEmptyParts)); QMakeVfs vfs; QMakeParser parser(0, &vfs, &handler); ProFile *pro = parser.parsedProBlock(QStringRef(&in), 0, "in", 1, QMakeParser::FullGrammar); -- cgit v1.2.3 From 305ddbeb5ba21e1a976106a2b9fd59252d750c61 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 25 Feb 2020 17:22:09 +0100 Subject: Use Qt::SplitBehavior in preference to QString::SplitBehavior The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer --- tests/auto/tools/rcc/tst_rcc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/tools') diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp index 42a4134e5f..0b8a84028f 100644 --- a/tests/auto/tools/rcc/tst_rcc.cpp +++ b/tests/auto/tools/rcc/tst_rcc.cpp @@ -176,7 +176,7 @@ void tst_rcc::rcc_data() } static QStringList readLinesFromFile(const QString &fileName, - QString::SplitBehavior splitBehavior) + Qt::SplitBehavior splitBehavior) { QFile file(fileName); @@ -226,7 +226,7 @@ void tst_rcc::rcc() const QStringList actualLines = out.split(nl); const QStringList expectedLines = - readLinesFromFile(directory + QLatin1Char('/') + expected, QString::KeepEmptyParts); + readLinesFromFile(directory + QLatin1Char('/') + expected, Qt::KeepEmptyParts); QVERIFY(!expectedLines.isEmpty()); const QString diff = doCompare(actualLines, expectedLines, directory); @@ -238,7 +238,7 @@ static QStringMap readExpectedFiles(const QString &fileName) { QStringMap expectedFiles; - QStringList lines = readLinesFromFile(fileName, QString::SkipEmptyParts); + QStringList lines = readLinesFromFile(fileName, Qt::SkipEmptyParts); foreach (const QString &line, lines) { QString resourceFileName = line.section(QLatin1Char(' '), 0, 0, QString::SectionSkipEmpty); QString actualFileName = line.section(QLatin1Char(' '), 1, 1, QString::SectionSkipEmpty); @@ -304,7 +304,7 @@ void tst_rcc::binary_data() QString localeFileName = absoluteBaseName + QLatin1String(".locale"); QFile localeFile(localeFileName); if (localeFile.exists()) { - QStringList locales = readLinesFromFile(localeFileName, QString::SkipEmptyParts); + QStringList locales = readLinesFromFile(localeFileName, Qt::SkipEmptyParts); foreach (const QString &locale, locales) { QString expectedFileName = QString::fromLatin1("%1.%2.%3").arg(absoluteBaseName, locale, QLatin1String("expected")); QStringMap expectedFiles = readExpectedFiles(expectedFileName); @@ -483,9 +483,9 @@ void tst_rcc::python() QVERIFY2(process.exitCode() == 0, msgProcessFailed(process).constData()); - const auto actualLines = readLinesFromFile(actualFile, QString::KeepEmptyParts); + const auto actualLines = readLinesFromFile(actualFile, Qt::KeepEmptyParts); QVERIFY(!actualLines.isEmpty()); - const auto expectedLines = readLinesFromFile(expectedFile, QString::KeepEmptyParts); + const auto expectedLines = readLinesFromFile(expectedFile, Qt::KeepEmptyParts); QVERIFY(!expectedLines.isEmpty()); const QString diff = doCompare(actualLines, expectedLines, path); if (!diff.isEmpty()) -- cgit v1.2.3