summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qktxhandler.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/util/qktxhandler.cpp
parent2e29f55f76e49c1fbffd2af51ec19d59b87f0e72 (diff)
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/util/qktxhandler.cpp')
-rw-r--r--src/gui/util/qktxhandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
index c1bf04f3ef..5966d38446 100644
--- a/src/gui/util/qktxhandler.cpp
+++ b/src/gui/util/qktxhandler.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
#define KTX_IDENTIFIER_LENGTH 12
static const char ktxIdentifier[KTX_IDENTIFIER_LENGTH] = { '\xAB', 'K', 'T', 'X', ' ', '1', '1', '\xBB', '\r', '\n', '\x1A', '\n' };
static const quint32 platformEndianIdentifier = 0x04030201;
@@ -237,7 +239,7 @@ QMap<QByteArray, QByteArray> QKtxHandler::decodeKeyValues(QByteArrayView view) c
// To separate the key and value we convert the complete data to utf-8 and find the first
// null terminator from the left, here we split the data into two.
const auto str = QString::fromUtf8(view.constData() + offset, keyAndValueByteSize);
- const int idx = str.indexOf(QLatin1Char('\0'));
+ const int idx = str.indexOf('\0'_L1);
if (idx == -1)
continue;