summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:44:40 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-07 17:15:55 +0200
commit728dbefc9c69c47353f5f9c5ccc7f140bb0bf2a0 (patch)
tree3c6e139259f6a2a03dde4da05d79533afedc4380
parent290e04469a3d8e19c0a7017138ae7d4e812615e1 (diff)
downloadqtwebchannel-728dbefc9c69c47353f5f9c5ccc7f140bb0bf2a0.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. Task-number: QTBUG-99313 Change-Id: Ife5eb4ded5b31ee3cca69ab6b6e6a94a08de32ab Reviewed-by: Ivan Solovev <ivan.solovev@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 b1fed71..84c3709 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -917,7 +917,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);
}
}