diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-13 11:42:38 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-05-04 10:00:35 +0200 |
commit | ceaa7d6341e666f6fe0d071ea34cad9877961a0e (patch) | |
tree | 7280a74e2e0e498720dcd141ac4f759df766a669 /src/plugins/platforms/windows/qwindowstheme.cpp | |
parent | 5020d1b22a31f5fe45287547037c57fa5aeb06d7 (diff) |
Plugins: use _L1 for for creating Latin-1 string literals
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.
Task-number: QTBUG-98434
Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowstheme.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 9ee6bbd79a..f64022332d 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -88,6 +88,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + static inline QColor COLORREFToQColor(COLORREF cr) { return QColor(GetRValue(cr), GetGValue(cr), GetBValue(cr)); @@ -460,7 +462,7 @@ QWindowsTheme::~QWindowsTheme() static inline QStringList iconThemeSearchPaths() { - const QFileInfo appDir(QCoreApplication::applicationDirPath() + QLatin1String("/icons")); + const QFileInfo appDir(QCoreApplication::applicationDirPath() + "/icons"_L1); return appDir.isDir() ? QStringList(appDir.absoluteFilePath()) : QStringList(); } @@ -833,7 +835,7 @@ enum { // Shell image list ids static QString dirIconPixmapCacheKey(int iIcon, int iconSize, int imageListSize) { - QString key = QLatin1String("qt_dir_") + QString::number(iIcon); + QString key = "qt_dir_"_L1 + QString::number(iIcon); if (iconSize == SHGFI_LARGEICON) key += u'l'; switch (imageListSize) { @@ -924,7 +926,7 @@ QString QWindowsFileIconEngine::cacheKey() const || !suffix.compare(u"ico", Qt::CaseInsensitive)) { return QString(); } - return QLatin1String("qt_.") + return "qt_."_L1 + (suffix.isEmpty() ? fileInfo().fileName() : std::move(suffix).toUpper()); // handle "Makefile" ;) } |