diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/lancelot/paintcommands.cpp | 12 | ||||
-rw-r--r-- | tests/auto/other/lancelot/tst_lancelot.cpp | 2 | ||||
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 2 | ||||
-rw-r--r-- | tests/auto/tools/rcc/tst_rcc.cpp | 12 | ||||
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp | 2 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtext/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/filedialogpanel.cpp | 4 | ||||
-rw-r--r-- | tests/manual/highdpi/dragwidget.cpp | 2 | ||||
-rw-r--r-- | tests/manual/lance/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/textrendering/glyphshaping/main.cpp | 2 |
11 files changed, 22 insertions, 22 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())); } } diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 0e61647e76..fa1fedc189 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -760,7 +760,7 @@ void tst_QAccessibility::textAttributes() QCOMPARE(startOffset, startOffsetResult); QCOMPARE(endOffset, endOffsetResult); - QStringList attrList = attributes.split(QChar(';'), QString::SkipEmptyParts); + QStringList attrList = attributes.split(QChar(';'), Qt::SkipEmptyParts); attributeResult.sort(); attrList.sort(); QCOMPARE(attrList, attributeResult); 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()) diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 5b11cd5d11..45026170e3 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -11775,7 +11775,7 @@ public: QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(Qt::Vertical); QLatin1String wiseWords("AZ BUKI VEDI"); QString sentence(wiseWords); - QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts); + QStringList words = sentence.split(QLatin1Char(' '), Qt::SkipEmptyParts); for (int i = 0; i < words.count(); ++i) { QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this); QLabel *label = new QLabel(words.at(i)); diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp index bd0889bf4a..1c17f86cf9 100644 --- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp +++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp @@ -110,7 +110,7 @@ void tst_LanceBench::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)); } } diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index ff92a15017..7cd4931ca2 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -123,7 +123,7 @@ void tst_QText::shaping_data() QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); QVERIFY(data.count() > 1000); - QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), QString::SkipEmptyParts); + QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), Qt::SkipEmptyParts); QVERIFY(list.count() %2 == 0); // even amount as we have title and then content. for (int i=0; i < list.count(); i+=2) { QTest::newRow(list.at(i).toLatin1()) << list.at(i+1); diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp index 25c1e44b8c..12b9c6d55e 100644 --- a/tests/manual/dialogs/filedialogpanel.cpp +++ b/tests/manual/dialogs/filedialogpanel.cpp @@ -307,7 +307,7 @@ QFileDialog::Options FileDialogPanel::options() const QStringList FileDialogPanel::allowedSchemes() const { - return m_allowedSchemes->text().simplified().split(' ', QString::SkipEmptyParts); + return m_allowedSchemes->text().simplified().split(' ', Qt::SkipEmptyParts); } void FileDialogPanel::getOpenFileNames() @@ -468,7 +468,7 @@ void FileDialogPanel::applySettings(QFileDialog *d) const if (!file.isEmpty()) d->selectFile(file); const QString filter = m_selectedNameFilter->text().trimmed(); - const QStringList filters = m_nameFilters->toPlainText().trimmed().split(QLatin1Char('\n'), QString::SkipEmptyParts); + const QStringList filters = m_nameFilters->toPlainText().trimmed().split(QLatin1Char('\n'), Qt::SkipEmptyParts); if (!m_useMimeTypeFilters->isChecked()) { d->setNameFilters(filters); if (!filter.isEmpty()) diff --git a/tests/manual/highdpi/dragwidget.cpp b/tests/manual/highdpi/dragwidget.cpp index 8ad3d3ca47..674b2e6a0d 100644 --- a/tests/manual/highdpi/dragwidget.cpp +++ b/tests/manual/highdpi/dragwidget.cpp @@ -110,7 +110,7 @@ void DragWidget::dropEvent(QDropEvent *event) if (event->mimeData()->hasText()) { const QMimeData *mime = event->mimeData(); QStringList pieces = mime->text().split(QRegularExpression("\\s+"), - QString::SkipEmptyParts); + Qt::SkipEmptyParts); QPoint position = event->pos(); QPoint hotSpot; diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp index 6dc5e2076a..c8e79f42f0 100644 --- a/tests/manual/lance/main.cpp +++ b/tests/manual/lance/main.cpp @@ -364,7 +364,7 @@ int main(int argc, char **argv) if (file.open(QIODevice::ReadOnly)) { QTextStream textFile(&file); QString script = textFile.readAll(); - content = script.split("\n", QString::SkipEmptyParts); + content = script.split("\n", Qt::SkipEmptyParts); } else { printf("failed to read file: '%s'\n", qPrintable(fileinfo.absoluteFilePath())); continue; diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp index c1e49b3b7e..6baf611b98 100644 --- a/tests/manual/textrendering/glyphshaping/main.cpp +++ b/tests/manual/textrendering/glyphshaping/main.cpp @@ -54,7 +54,7 @@ struct testDataSet QString charHexCsv2String(const QString &csv) { QString result; - foreach (const QString &charString, csv.split(QLatin1Char(','), QString::SkipEmptyParts)) { + foreach (const QString &charString, csv.split(QLatin1Char(','), Qt::SkipEmptyParts)) { bool isOk; const uint charUInt = charString.toUInt(&isOk, 16); Q_ASSERT(isOk); |