summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-11-11 16:26:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-11-15 14:24:06 +0100
commitfce5b310d208869bdb4b778ccd43185c86d88d86 (patch)
treebbb907622bb0e644932194bcaf63cf0cf77140c7
parentf5ce8a99c75850dbd6065c86b48656b05d8c6966 (diff)
downloadqtwebchannel-fce5b310d208869bdb4b778ccd43185c86d88d86.tar.gz
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. This is a 6.4 re-run of the script we ran in dev, in order to avoid conflicts between the branches when cherry-picking. Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 8a66897..7b574cb 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -885,7 +885,7 @@ QJsonValue QMetaObjectPublisher::wrapResult(const QVariant &result, QWebChannelA
if (oi.transports.isEmpty())
oi.transports = webChannel->d_func()->transports;
- for (auto transport : qAsConst(oi.transports)) {
+ for (auto transport : std::as_const(oi.transports)) {
transportedWrappedObjects.insert(transport, id);
}
}