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 --- src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp | 2 +- src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 8 ++++---- src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/platformsupport') 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()) -- cgit v1.2.3