summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-02-25 17:22:09 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-28 15:37:11 +0100
commit305ddbeb5ba21e1a976106a2b9fd59252d750c61 (patch)
treef5f9bde08bf8b12cbf69a6350d807955d8b3a1e2
parent26b1cf2bbaa5a847f8b03137f666b7f32b16d843 (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>
-rw-r--r--src/dbus/qdbusmisc.cpp2
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp2
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp2
-rw-r--r--src/gui/text/qcssparser.cpp2
-rw-r--r--src/network/access/qnetworkreplywasmimpl.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp4
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp8
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp2
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp2
-rw-r--r--src/tools/androiddeployqt/main.cpp4
-rw-r--r--src/tools/tracegen/provider.cpp3
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp2
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp12
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp2
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp2
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp12
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp2
-rw-r--r--tests/manual/dialogs/filedialogpanel.cpp4
-rw-r--r--tests/manual/highdpi/dragwidget.cpp2
-rw-r--r--tests/manual/lance/main.cpp2
-rw-r--r--tests/manual/textrendering/glyphshaping/main.cpp2
-rw-r--r--util/accessibilityinspector/accessibilityscenemanager.cpp2
30 files changed, 46 insertions, 47 deletions
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index c321b7524d..46cf857751 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -95,7 +95,7 @@ QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
} else {
interface.prepend(QLatin1Char('.')).prepend(QCoreApplication::instance()->applicationName());
const QString organizationDomain = QCoreApplication::instance()->organizationDomain();
- const auto domainName = organizationDomain.splitRef(QLatin1Char('.'), QString::SkipEmptyParts);
+ const auto domainName = organizationDomain.splitRef(QLatin1Char('.'), Qt::SkipEmptyParts);
if (domainName.isEmpty()) {
interface.prepend(QLatin1String("local."));
} else {
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 7370ce0de3..f11b71dadf 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -285,7 +285,7 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, con
interface.prepend(QLatin1Char('.')).prepend(QCoreApplication::instance()->applicationName());
QStringList domainName =
QCoreApplication::instance()->organizationDomain().split(QLatin1Char('.'),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
if (domainName.isEmpty())
interface.prepend(QLatin1String("local."));
else
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 9a5aefbfed..ec72180f0d 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2145,7 +2145,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
dest.setColorTable(clut);
QString textsKeys = src.text();
- const auto textKeyList = textsKeys.splitRef(QLatin1Char('\n'), QString::SkipEmptyParts);
+ const auto textKeyList = textsKeys.splitRef(QLatin1Char('\n'), Qt::SkipEmptyParts);
for (const auto &textKey : textKeyList) {
const auto textKeySplitted = textKey.split(QLatin1String(": "));
dest.setText(textKeySplitted[0].toString(), textKeySplitted[1].toString());
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 15ac4acf91..5face96575 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -788,7 +788,7 @@ QStringList QPlatformFileDialogHelper::cleanFilterList(const QString &filter)
filter.indexOf(regexp, 0, &match);
if (match.hasMatch())
f = match.captured(2);
- return f.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ return f.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#else
return QStringList();
#endif
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index a12eb98528..53d399a4bf 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1584,7 +1584,7 @@ QRect Declaration::rectValue() const
const QStringList func = v.variant.toStringList();
if (func.count() != 2 || func.at(0).compare(QLatin1String("rect")) != 0)
return QRect();
- const auto args = func[1].splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
+ const auto args = func[1].splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
if (args.count() != 4)
return QRect();
QRect rect(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp
index f28b8415d1..8c0f9bdf55 100644
--- a/src/network/access/qnetworkreplywasmimpl.cpp
+++ b/src/network/access/qnetworkreplywasmimpl.cpp
@@ -510,7 +510,7 @@ void QNetworkReplyWasmImplPrivate::headersReceived(const QString &bufferString)
Q_Q(QNetworkReplyWasmImpl);
if (!bufferString.isEmpty()) {
- QStringList headers = bufferString.split(QString::fromUtf8("\r\n"), QString::SkipEmptyParts);
+ QStringList headers = bufferString.split(QString::fromUtf8("\r\n"), Qt::SkipEmptyParts);
for (int i = 0; i < headers.size(); i++) {
QString headerName = headers.at(i).split(QString::fromUtf8(": ")).at(0);
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 912b30b29b..8f1d5d377d 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1342,7 +1342,7 @@ void QSslSocket::setCiphers(const QString &ciphers)
{
Q_D(QSslSocket);
d->configuration.ciphers.clear();
- const auto cipherNames = ciphers.split(QLatin1Char(':'), QString::SkipEmptyParts);
+ const auto cipherNames = ciphers.split(QLatin1Char(':'), Qt::SkipEmptyParts);
for (const QString &cipherName : cipherNames) {
QSslCipher cipher(cipherName);
if (!cipher.isNull())
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index b04aa3bcf2..e197ce6515 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -257,7 +257,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(const SSL_CIPHER
char buf [256];
QString descriptionOneLine = QString::fromLatin1(q_SSL_CIPHER_description(cipher, buf, sizeof(buf)));
- const auto descriptionList = descriptionOneLine.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
+ const auto descriptionList = descriptionOneLine.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
if (descriptionList.size() > 5) {
// ### crude code.
ciph.d->isNull = false;
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 71a268ae6e..84422e9c8f 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -570,7 +570,7 @@ static QStringList libraryPathList()
QStringList paths;
# ifdef Q_OS_DARWIN
paths = QString::fromLatin1(qgetenv("DYLD_LIBRARY_PATH"))
- .split(QLatin1Char(':'), QString::SkipEmptyParts);
+ .split(QLatin1Char(':'), Qt::SkipEmptyParts);
// search in .app/Contents/Frameworks
UInt32 packageType;
@@ -582,7 +582,7 @@ static QStringList libraryPathList()
}
# else
paths = QString::fromLatin1(qgetenv("LD_LIBRARY_PATH"))
- .split(QLatin1Char(':'), QString::SkipEmptyParts);
+ .split(QLatin1Char(':'), Qt::SkipEmptyParts);
# endif
paths << QLatin1String("/lib") << QLatin1String("/usr/lib") << QLatin1String("/usr/local/lib");
paths << QLatin1String("/lib64") << QLatin1String("/usr/lib64") << QLatin1String("/usr/local/lib64");
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
index f601a196ca..478fe61a44 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
@@ -216,7 +216,7 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev)
if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 )) {
const QString capabilities_key = QString::fromUtf8(udev_device_get_sysattr_value(dev, "capabilities/key"));
- const auto val = capabilities_key.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
+ const auto val = capabilities_key.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
if (!val.isEmpty()) {
bool ok;
unsigned long long keys = val.last().toULongLong(&ok, 16);
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index 012edc82e4..88539b7220 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -2050,10 +2050,10 @@ QVariantList AtSpiAdaptor::getAttributes(QAccessibleInterface *interface, int of
int endOffset;
QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);
- const QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
+ const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive);
for (const QString &attr : attributes) {
QStringList items;
- items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);
+ items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive);
AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);
if (!attribute.isNull())
set[attribute.name] = attribute.value;
@@ -2074,10 +2074,10 @@ QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, in
int endOffset;
joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset);
- const QStringList attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive);
+ const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive);
for (const QString& attr : attributes) {
QStringList items;
- items = attr.split(QLatin1Char(':'), QString::SkipEmptyParts, Qt::CaseSensitive);
+ items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive);
AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]);
if (!attribute.isNull())
map[attribute.name] = attribute.value;
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 36d9e4e065..cb1b39db64 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -641,7 +641,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme()
const QString kdeDirsVar = QFile::decodeName(qgetenv("KDEDIRS"));
if (!kdeDirsVar.isEmpty())
- kdeDirs += kdeDirsVar.split(QLatin1Char(':'), QString::SkipEmptyParts);
+ kdeDirs += kdeDirsVar.split(QLatin1Char(':'), Qt::SkipEmptyParts);
const QString kdeVersionHomePath = QDir::homePath() + QLatin1String("/.kde") + QLatin1String(kdeVersionBA);
if (QFileInfo(kdeVersionHomePath).isDir())
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
index dcf52921aa..13c39436ba 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
@@ -225,7 +225,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
QRegularExpressionMatch match = regexp.match(filter);
if (match.hasMatch()) {
QString userVisibleName = match.captured(1);
- QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), QString::SkipEmptyParts);
+ QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), Qt::SkipEmptyParts);
FilterConditionList filterConditions;
for (const QString &filterString : filterStrings) {
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 3d378024c9..97e5c9eb69 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -896,7 +896,7 @@ bool readInputFile(Options *options)
{
const QJsonValue extraLibs = jsonObject.value(QLatin1String("android-extra-libs"));
if (!extraLibs.isUndefined())
- options->extraLibs = extraLibs.toString().split(QLatin1Char(','), QString::SkipEmptyParts);
+ options->extraLibs = extraLibs.toString().split(QLatin1Char(','), Qt::SkipEmptyParts);
}
{
@@ -980,7 +980,7 @@ bool readInputFile(Options *options)
}
{
const QJsonValue qrcFiles = jsonObject.value(QLatin1String("qrcFiles"));
- options->qrcFiles = qrcFiles.toString().split(QLatin1Char(','), QString::SkipEmptyParts);
+ options->qrcFiles = qrcFiles.toString().split(QLatin1Char(','), Qt::SkipEmptyParts);
}
options->packageName = packageNameFromAndroidManifest(options->androidSourceDirectory + QLatin1String("/AndroidManifest.xml"));
if (options->packageName.isEmpty())
diff --git a/src/tools/tracegen/provider.cpp b/src/tools/tracegen/provider.cpp
index 39633efe5d..7dfa6a86d6 100644
--- a/src/tools/tracegen/provider.cpp
+++ b/src/tools/tracegen/provider.cpp
@@ -296,8 +296,7 @@ Provider parseProvider(const QString &filename)
if (tracedef.exactMatch(line)) {
const QString name = tracedef.cap(1);
const QString argsString = tracedef.cap(2);
- const QStringList args = argsString.split(QLatin1Char(','),
- QString::SkipEmptyParts);
+ const QStringList args = argsString.split(QLatin1Char(','), Qt::SkipEmptyParts);
provider.tracepoints << parseTracepoint(name, args, filename, lineNumber);
} else {
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 6283e28c0e..add8e6db91 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -4363,7 +4363,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const
QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']'));
#if defined(Q_OS_WIN)
- QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);
+ QStringList parts = pathCopy.split(re, Qt::SkipEmptyParts);
if (!doubleSlash.isEmpty() && !parts.isEmpty())
parts[0].prepend(doubleSlash);
if (pathCopy.endsWith(sep))
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index d516b1b312..4644f0f04e 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -376,7 +376,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS
absolutePath = QDir(longPath).absolutePath();
// ### TODO can we use bool QAbstractFileEngine::caseSensitive() const?
- QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
+ QStringList pathElements = absolutePath.split(QLatin1Char('/'), Qt::SkipEmptyParts);
if ((pathElements.isEmpty())
#if !defined(Q_OS_WIN)
&& QDir::fromNativeSeparators(longPath) != QLatin1String("/")
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index 8d1538a213..6cb0824572 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -873,7 +873,7 @@ QModelIndex QDirModel::index(const QString &path, int column) const
}
#endif
- QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
+ QStringList pathElements = absolutePath.split(QLatin1Char('/'), Qt::SkipEmptyParts);
if ((pathElements.isEmpty() || !QFileInfo::exists(path))
#if !defined(Q_OS_WIN)
&& path != QLatin1String("/")
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);
diff --git a/util/accessibilityinspector/accessibilityscenemanager.cpp b/util/accessibilityinspector/accessibilityscenemanager.cpp
index 95dd72b31f..8426b35c42 100644
--- a/util/accessibilityinspector/accessibilityscenemanager.cpp
+++ b/util/accessibilityinspector/accessibilityscenemanager.cpp
@@ -405,7 +405,7 @@ void AccessibilitySceneManager::addGraphicsItems(AccessibilitySceneManager::Tree
QString text;
text += item.name + "\n";
text += item.role + "\n";
- text += item.description.split(" ", QString::SkipEmptyParts).join("\n") + "\n";
+ text += item.description.split(QLatin1Char(' '), Qt::SkipEmptyParts).join("\n") + "\n";
text += "P:" + QString::number(item.rect.x()) + " " + QString::number(item.rect.y()) + " ";
text += "S:" + QString::number(item.rect.width()) + " " + QString::number(item.rect.height()) + "\n";