diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-02-25 16:10:40 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-03-02 15:58:47 +0100 |
commit | 744246b1129f6042c0264eb578a6e5c86e09f80a (patch) | |
tree | 51a73903f7fbe86f567ba1cf94331f9a3e934ac5 /src | |
parent | be2c7864983b23b6337305b4653987b1efa8718e (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 cloaser to that goal.
Change-Id: I3214ad6ccaca9dfd4a026589cabeb40cbf4a6298
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/wavefrontmesh/qwavefrontmesh.cpp | 10 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/imports/wavefrontmesh/qwavefrontmesh.cpp b/src/imports/wavefrontmesh/qwavefrontmesh.cpp index e973ef0103..1772c40c50 100644 --- a/src/imports/wavefrontmesh/qwavefrontmesh.cpp +++ b/src/imports/wavefrontmesh/qwavefrontmesh.cpp @@ -257,7 +257,7 @@ void QWavefrontMesh::readData() while (!stream.atEnd()) { stream.readLineInto(&buffer); - QVector<QStringRef> tokens = buffer.splitRef(space, QString::SkipEmptyParts); + QVector<QStringRef> tokens = buffer.splitRef(space, Qt::SkipEmptyParts); if (tokens.size() < 2) continue; @@ -316,7 +316,7 @@ void QWavefrontMesh::readData() if (tokens.size() >= 4 && tokens.size() <= 5) { { bool ok; - QVector<QStringRef> faceTokens = tokens.at(1).split(slash, QString::SkipEmptyParts); + QVector<QStringRef> faceTokens = tokens.at(1).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p1 = faceTokens.at(0).toInt(&ok) - 1; @@ -336,7 +336,7 @@ void QWavefrontMesh::readData() { bool ok; - QVector<QStringRef> faceTokens = tokens.at(2).split(slash, QString::SkipEmptyParts); + QVector<QStringRef> faceTokens = tokens.at(2).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p2 = faceTokens.at(0).toInt(&ok) - 1; @@ -356,7 +356,7 @@ void QWavefrontMesh::readData() { bool ok; - QVector<QStringRef> faceTokens = tokens.at(3).split(slash, QString::SkipEmptyParts); + QVector<QStringRef> faceTokens = tokens.at(3).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p3 = faceTokens.at(0).toInt(&ok) - 1; @@ -394,7 +394,7 @@ void QWavefrontMesh::readData() if (tokens.size() == 5) { bool ok; - QVector<QStringRef> faceTokens = tokens.at(4).split(slash, QString::SkipEmptyParts); + QVector<QStringRef> faceTokens = tokens.at(4).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); int p4 = faceTokens.at(0).toInt(&ok) - 1; diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp index bf73440a39..c504ea605a 100644 --- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp +++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp @@ -183,7 +183,7 @@ QQmlNativeDebugConnector::QQmlNativeDebugConnector() : m_blockingMode(false) { const QString args = commandLineArguments(); - const auto lstjsDebugArguments = args.splitRef(QLatin1Char(','), QString::SkipEmptyParts); + const auto lstjsDebugArguments = args.splitRef(QLatin1Char(','), Qt::SkipEmptyParts); QStringList services; for (const QStringRef &strArgument : lstjsDebugArguments) { if (strArgument == QLatin1String("block")) { diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp index 33b6606b44..4d68a4508b 100644 --- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp @@ -345,7 +345,7 @@ void QQmlDebugServerImpl::parseArguments() QString fileName; QStringList services; - const auto lstjsDebugArguments = args.splitRef(QLatin1Char(','), QString::SkipEmptyParts); + const auto lstjsDebugArguments = args.splitRef(QLatin1Char(','), Qt::SkipEmptyParts); for (auto argsIt = lstjsDebugArguments.begin(), argsItEnd = lstjsDebugArguments.end(); argsIt != argsItEnd; ++argsIt) { const QStringRef &strArgument = *argsIt; if (strArgument.startsWith(QLatin1String("port:"))) { diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index e442f07527..2a6ede83c7 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -534,7 +534,7 @@ static QString joinStringRefs(const QVector<QStringRef> &refs, const QChar &sep) */ QStringList QQmlImports::completeQmldirPaths(const QString &uri, const QStringList &basePaths, int vmaj, int vmin) { - const QVector<QStringRef> parts = uri.splitRef(Dot, QString::SkipEmptyParts); + const QVector<QStringRef> parts = uri.splitRef(Dot, Qt::SkipEmptyParts); QStringList qmlDirPathsPaths; // fully & partially versioned parts + 1 unversioned for each base path @@ -1881,7 +1881,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) #else QLatin1Char pathSep(':'); #endif - QStringList paths = envImportPath.split(pathSep, QString::SkipEmptyParts); + QStringList paths = envImportPath.split(pathSep, Qt::SkipEmptyParts); for (int ii = paths.count() - 1; ii >= 0; --ii) addImportPath(paths.at(ii)); } @@ -1893,7 +1893,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QT_BUNDLED_LIBS_PATH"))) { const QString envImportPath = qEnvironmentVariable("QT_BUNDLED_LIBS_PATH"); QLatin1Char pathSep(':'); - QStringList paths = envImportPath.split(pathSep, QString::SkipEmptyParts); + QStringList paths = envImportPath.split(pathSep, Qt::SkipEmptyParts); for (int ii = paths.count() - 1; ii >= 0; --ii) addPluginPath(paths.at(ii)); } |