aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:30:50 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-07 23:38:56 +0200
commitc2d490a2385ea6f389340a296acaac0fa198c8b9 (patch)
tree5bc4dc681c9a9501cb9b2f39b8a1ab6e3d76ccfd /src/qml/qml/qqml.cpp
parent958cd3ee1094a068b6d0ff27c73a4b3caff088ad (diff)
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r--src/qml/qml/qqml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 4b7c21e3ac..68cf1dc130 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -592,7 +592,7 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data)
auto revisions = prepareRevisions(type.instanceMetaObject, added) + furtherRevisions;
uniqueRevisions(&revisions, type.version, added);
- for (QTypeRevision revision : qAsConst(revisions)) {
+ for (QTypeRevision revision : std::as_const(revisions)) {
if (revision.hasMajorVersion() && revision.majorVersion() > type.version.majorVersion())
break;
@@ -635,7 +635,7 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data)
revisions.append(added);
uniqueRevisions(&revisions, type.version, added);
- for (QTypeRevision revision : qAsConst(revisions)) {
+ for (QTypeRevision revision : std::as_const(revisions)) {
if (revision < added)
continue;
if (revision.hasMajorVersion() && revision.majorVersion() > type.version.majorVersion())