aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-12-27 10:47:42 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-12-27 23:11:34 +0100
commit6ac764a4d9e3bd723e955e8e9d5efd8ef6900214 (patch)
tree3cb758b87539e8a400e95b3aff5006975101db85 /src/qml/qml/qqml.cpp
parentcf85487792d4d269527e30e65b720a68ec161246 (diff)
QQmlPrivate: Don't allocate just to parse a number
... or compare to "true". Use QLatin1StringView::toInt() and qstrcmp() instead. Pick-to: 6.5 Change-Id: I3052895b59c5b8232097bf56255ba328bc6b3e95 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r--src/qml/qml/qqml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index db04e7c6d8..73eff6f3fc 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -719,7 +719,7 @@ QList<QTypeRevision> QQmlPrivate::revisionClassInfos(const QMetaObject *metaObje
for (int index = indexOfOwnClassInfo(metaObject, key); index != -1;
index = indexOfOwnClassInfo(metaObject, key, index - 1)) {
revisions.push_back(QTypeRevision::fromEncodedVersion(
- QByteArray(metaObject->classInfo(index).value()).toInt()));
+ QLatin1StringView(metaObject->classInfo(index).value()).toInt()));
}
return revisions;
}