diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-02-25 17:22:09 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-02-28 15:37:11 +0100 |
commit | 305ddbeb5ba21e1a976106a2b9fd59252d750c61 (patch) | |
tree | f5f9bde08bf8b12cbf69a6350d807955d8b3a1e2 /tests/auto/other/lancelot | |
parent | 26b1cf2bbaa5a847f8b03137f666b7f32b16d843 (diff) |
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 <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/other/lancelot')
-rw-r--r-- | tests/auto/other/lancelot/paintcommands.cpp | 12 | ||||
-rw-r--r-- | tests/auto/other/lancelot/tst_lancelot.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 7430c93a8e..c1ff7e7a87 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -890,7 +890,7 @@ void PaintCommands::command_import(QRegularExpressionMatch re) m_commands[m_currentCommandIndex] = QLatin1String("# import file (") + fileinfo.fileName() + QLatin1String(") start"); QString rawContent = QString::fromUtf8(file->readAll()); - QStringList importedData = rawContent.split('\n', QString::SkipEmptyParts); + QStringList importedData = rawContent.split('\n', Qt::SkipEmptyParts); importedData.append(QLatin1String("# import file (") + fileinfo.fileName() + QLatin1String(") end ---")); insertAt(m_currentCommandIndex, importedData); @@ -1146,7 +1146,7 @@ void PaintCommands::command_drawPolygon(QRegularExpressionMatch re) static QRegularExpression separators("\\s"); QStringList caps = re.capturedTexts(); QString cap = caps.at(1); - QStringList numbers = cap.split(separators, QString::SkipEmptyParts); + QStringList numbers = cap.split(separators, Qt::SkipEmptyParts); QPolygonF array; for (int i=0; i + 1<numbers.size(); i+=2) @@ -1162,7 +1162,7 @@ void PaintCommands::command_drawPolygon(QRegularExpressionMatch re) void PaintCommands::command_drawPolyline(QRegularExpressionMatch re) { static QRegularExpression separators("\\s"); - QStringList numbers = re.captured(1).split(separators, QString::SkipEmptyParts); + QStringList numbers = re.captured(1).split(separators, Qt::SkipEmptyParts); QPolygonF array; for (int i=0; i + 1<numbers.size(); i+=2) @@ -1455,7 +1455,7 @@ void PaintCommands::command_path_addPolygon(QRegularExpressionMatch re) QStringList caps = re.capturedTexts(); QString name = caps.at(1); QString cap = caps.at(2); - QStringList numbers = cap.split(separators, QString::SkipEmptyParts); + QStringList numbers = cap.split(separators, Qt::SkipEmptyParts); QPolygonF array; for (int i=0; i + 1<numbers.size(); i+=2) @@ -2686,7 +2686,7 @@ void PaintCommands::command_pen_setDashPattern(QRegularExpressionMatch re) static QRegularExpression separators("\\s"); QStringList caps = re.capturedTexts(); QString cap = caps.at(1); - QStringList numbers = cap.split(separators, QString::SkipEmptyParts); + QStringList numbers = cap.split(separators, Qt::SkipEmptyParts); QVector<qreal> pattern; for (int i=0; i<numbers.size(); ++i) @@ -2722,7 +2722,7 @@ void PaintCommands::command_drawConvexPolygon(QRegularExpressionMatch re) static QRegularExpression separators("\\s"); QStringList caps = re.capturedTexts(); QString cap = caps.at(1); - QStringList numbers = cap.split(separators, QString::SkipEmptyParts); + QStringList numbers = cap.split(separators, Qt::SkipEmptyParts); QPolygonF array; for (int i=0; i + 1<numbers.size(); i+=2) diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp index ba04802a26..7c0d809c01 100644 --- a/tests/auto/other/lancelot/tst_lancelot.cpp +++ b/tests/auto/other/lancelot/tst_lancelot.cpp @@ -129,7 +129,7 @@ void tst_Lancelot::initTestCase() QFile file(scriptsDir + fileName); file.open(QFile::ReadOnly); QByteArray cont = file.readAll(); - scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), QString::SkipEmptyParts)); + scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), Qt::SkipEmptyParts)); scriptChecksums.insert(fileName, qChecksum(cont.constData(), cont.size())); } } |