diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-18 10:31:16 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-19 19:12:20 +0200 |
commit | 908e85cc85d18f56575ee040589bcd5745c62adb (patch) | |
tree | a7f28171c1465ea226018b73122f7b3e50721c18 /src/corelib | |
parent | a1d8b9023f499560b967965ef52af2a7de981727 (diff) |
Replace uses of _qs with _s in sources and examples
Task-number: QTBUG-101408
Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/doc/snippets/qmetatype/registerConverters.cpp | 2 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemiterator_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemerror.cpp | 2 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetype.cpp | 4 | ||||
-rw-r--r-- | src/corelib/text/qlocale_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/text/qregularexpression.cpp | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthreadpool.cpp | 2 |
10 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/doc/snippets/qmetatype/registerConverters.cpp b/src/corelib/doc/snippets/qmetatype/registerConverters.cpp index 11e9ce1bfc..663962faff 100644 --- a/src/corelib/doc/snippets/qmetatype/registerConverters.cpp +++ b/src/corelib/doc/snippets/qmetatype/registerConverters.cpp @@ -58,7 +58,7 @@ int main() { int y; int z; - QString toString() const { return u"[x: %1; y: %2, z: %3]"_qs.arg(QString::number(x), + QString toString() const { return u"[x: %1; y: %2, z: %3]"_s.arg(QString::number(x), QString::number(y), QString::number(z)); } }; diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 8e9da7a2a5..1cec39ec3b 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -148,7 +148,7 @@ static QSettings *findConfiguration() #endif if (QCoreApplication::instance()) { QDir pwd(QCoreApplication::applicationDirPath()); - qtconfig = pwd.filePath(u"qt" QT_STRINGIFY(QT_VERSION_MAJOR) ".conf"_qs); + qtconfig = pwd.filePath(u"qt" QT_STRINGIFY(QT_VERSION_MAJOR) ".conf"_s); if (QFile::exists(qtconfig)) return new QSettings(qtconfig, QSettings::IniFormat); qtconfig = pwd.filePath("qt.conf"_L1); @@ -532,7 +532,7 @@ QLibraryInfoPrivate::LocationInfo QLibraryInfoPrivate::locationInfo(QLibraryInfo result.key = QLatin1StringView(qtConfEntries.viewAt(loc * 2)); result.defaultValue = QLatin1StringView(qtConfEntries.viewAt(loc * 2 + 1)); if (result.key == u"QmlImports") - result.fallbackKey = u"Qml2Imports"_qs; + result.fallbackKey = u"Qml2Imports"_s; #ifndef Q_OS_WIN // On Windows we use the registry } else if (loc == QLibraryInfo::SettingsPath) { result.key = "Settings"_L1; diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index a1207c6263..cd166caf8b 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1648,7 +1648,7 @@ QString QFileSystemEngine::homePath() QString QFileSystemEngine::rootPath() { - return u"/"_qs; + return u"/"_s; } QString QFileSystemEngine::tempPath() diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp index 91cfef644c..fe4d55e514 100644 --- a/src/corelib/io/qfilesystemiterator_win.cpp +++ b/src/corelib/io/qfilesystemiterator_win.cpp @@ -61,7 +61,7 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi { Q_UNUSED(nameFilters); Q_UNUSED(flags); - if (nativePath.endsWith(u".lnk"_qs) && !QFileSystemEngine::isDirPath(dirPath, nullptr)) { + if (nativePath.endsWith(u".lnk"_s) && !QFileSystemEngine::isDirPath(dirPath, nullptr)) { QFileSystemMetaData metaData; QFileSystemEntry link = QFileSystemEngine::getLinkTarget(entry, metaData); nativePath = link.nativeFilePath(); diff --git a/src/corelib/io/qstorageinfo_win.cpp b/src/corelib/io/qstorageinfo_win.cpp index e9929c9921..54a40ebcef 100644 --- a/src/corelib/io/qstorageinfo_win.cpp +++ b/src/corelib/io/qstorageinfo_win.cpp @@ -251,7 +251,7 @@ bool QStorageInfoPrivate::queryStorageProperty() struct Helper { QBasicMutex mutex; - QSystemLibrary ntdll {u"ntdll"_qs}; + QSystemLibrary ntdll {u"ntdll"_s}; }; Q_GLOBAL_STATIC(Helper, gNtdllHelper) diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp index 1aea501416..3cb5bcccb2 100644 --- a/src/corelib/kernel/qsystemerror.cpp +++ b/src/corelib/kernel/qsystemerror.cpp @@ -154,7 +154,7 @@ QString QSystemError::string(ErrorScope errorScope, int errorCode) qWarning("invalid error scope"); Q_FALLTHROUGH(); case NoError: - return u"No error"_qs; + return u"No error"_s; } } diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp index 746776fdf2..4049a65612 100644 --- a/src/corelib/mimetypes/qmimetype.cpp +++ b/src/corelib/mimetypes/qmimetype.cpp @@ -260,9 +260,9 @@ QString QMimeType::comment() const QStringList languageList; languageList << QLocale().name(); languageList << QLocale().uiLanguages(); - languageList << u"default"_qs; // use the default locale if possible. + languageList << u"default"_s; // use the default locale if possible. for (const QString &language : qAsConst(languageList)) { - const QString lang = language == "C"_L1 ? u"en_US"_qs : language; + const QString lang = language == "C"_L1 ? u"en_US"_s : language; const QString comm = d->localeComments.value(lang); if (!comm.isEmpty()) return comm; diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp index c5f82b9500..0d3d4cae90 100644 --- a/src/corelib/text/qlocale_win.cpp +++ b/src/corelib/text/qlocale_win.cpp @@ -1113,7 +1113,7 @@ static QString winIso639LangName(LCID id) if (ok && *endptr == '\0') { switch (i) { case 0x814: - result = u"nn"_qs; // Nynorsk + result = u"nn"_s; // Nynorsk break; default: break; diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp index e90ec6b1e6..eb16049f9a 100644 --- a/src/corelib/text/qregularexpression.cpp +++ b/src/corelib/text/qregularexpression.cpp @@ -1597,7 +1597,7 @@ QString QRegularExpression::errorString() const #endif } #ifdef QT_NO_TRANSLATION - return u"no error"_qs; + return u"no error"_s; #else return QCoreApplication::translate("QRegularExpression", "no error"); #endif diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index 72865d5872..485e5b3150 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -279,7 +279,7 @@ void QThreadPoolPrivate::startThread(QRunnable *runnable) Q_ASSERT(runnable != nullptr); auto thread = std::make_unique<QThreadPoolThread>(this); if (objectName.isEmpty()) - objectName = u"Thread (pooled)"_qs; + objectName = u"Thread (pooled)"_s; thread->setObjectName(objectName); Q_ASSERT(!allThreads.contains(thread.get())); // if this assert hits, we have an ABA problem (deleted threads don't get removed here) allThreads.insert(thread.get()); |