summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qpluginloader.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-03-09 16:34:49 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-03-25 19:16:29 +0100
commit753a08ae0e1204b148cf3935f87349eefe75d338 (patch)
tree193ff5b6a131bba519336c31727d708ddab43032 /src/corelib/plugin/qpluginloader.cpp
parent1fefff6d1f99dbcf1a453424753ad5562fb675ef (diff)
QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicable
As a drive-by, did also minor refactorings/improvements. Task-number: QTBUG-98434 Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/corelib/plugin/qpluginloader.cpp')
-rw-r--r--src/corelib/plugin/qpluginloader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index eaca077c901..6dd51505399 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
#if QT_CONFIG(library)
/*!
@@ -269,7 +271,7 @@ static QString locatePlugin(const QString& fileName)
suffixes.prepend(QString());
// Split up "subdir/filename"
- const int slash = fileName.lastIndexOf(QLatin1Char('/'));
+ const int slash = fileName.lastIndexOf(u'/');
const auto baseName = QStringView{fileName}.mid(slash + 1);
const auto basePath = isAbsolute ? QStringView() : QStringView{fileName}.left(slash + 1); // keep the '/'
@@ -286,13 +288,13 @@ static QString locatePlugin(const QString& fileName)
#ifdef Q_OS_ANDROID
{
QString pluginPath = basePath + prefix + baseName + suffix;
- const QString fn = path + QLatin1String("/lib") + pluginPath.replace(QLatin1Char('/'), QLatin1Char('_'));
+ const QString fn = path + "/lib"_L1 + pluginPath.replace(u'/', u'_');
qCDebug(qt_lcDebugPlugins) << "Trying..." << fn;
if (QFileInfo(fn).isFile())
return fn;
}
#endif
- const QString fn = path + QLatin1Char('/') + basePath + prefix + baseName + suffix;
+ const QString fn = path + u'/' + basePath + prefix + baseName + suffix;
qCDebug(qt_lcDebugPlugins) << "Trying..." << fn;
if (QFileInfo(fn).isFile())
return fn;