summaryrefslogtreecommitdiff
path: root/src/gui/image/qicon.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-11 14:04:17 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-13 18:34:15 +0200
commita5b9600356cb8941a2d9685975b2454837b5e6ed (patch)
treeefecf045643824fe74d088d4b8bb8302b014bf96 /src/gui/image/qicon.cpp
parent2e29f55f76e49c1fbffd2af51ec19d59b87f0e72 (diff)
downloadqtbase-a5b9600356cb8941a2d9685975b2454837b5e6ed.tar.gz
QtGui: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I308d86cefcbfd126929b68f9a853d420840c965f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r--src/gui/image/qicon.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index de99474119..c27fd0f835 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -450,7 +450,7 @@ void QPixmapIconEngine::addFile(const QString &fileName, const QSize &size, QIco
{
if (fileName.isEmpty())
return;
- const QString abs = fileName.startsWith(QLatin1Char(':')) ? fileName : QFileInfo(fileName).absoluteFilePath();
+ const QString abs = fileName.startsWith(u':') ? fileName : QFileInfo(fileName).absoluteFilePath();
const bool ignoreSize = !size.isValid();
ImageReader imageReader(abs);
const QByteArray format = imageReader.format();
@@ -1557,11 +1557,11 @@ QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRati
if (disableNxImageLoading)
return baseFileName;
- int dotIndex = baseFileName.lastIndexOf(QLatin1Char('.'));
+ int dotIndex = baseFileName.lastIndexOf(u'.');
if (dotIndex == -1) { /* no dot */
dotIndex = baseFileName.size(); /* append */
- } else if (dotIndex >= 2 && baseFileName[dotIndex - 1] == QLatin1Char('9')
- && baseFileName[dotIndex - 2] == QLatin1Char('.')) {
+ } else if (dotIndex >= 2 && baseFileName[dotIndex - 1] == u'9'
+ && baseFileName[dotIndex - 2] == u'.') {
// If the file has a .9.* (9-patch image) extension, we must ensure that the @nx goes before it.
dotIndex -= 2;
}