aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:15:00 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-06 17:43:41 +0200
commita01b9dfc244aca91da35789333b088dc53b54994 (patch)
treeb0e29fa5bc162291f40c8ed60d39eba759b4b821 /examples
parentbe8150867f74f76fdcd85a516b5fb9a7abb1524a (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: I0483bd72018332f9a1d7c60537228ea6c85f7029 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/coap/consolecoapclient/coaphandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/coap/consolecoapclient/coaphandler.cpp b/examples/coap/consolecoapclient/coaphandler.cpp
index 4cb6dff..434280c 100644
--- a/examples/coap/consolecoapclient/coaphandler.cpp
+++ b/examples/coap/consolecoapclient/coaphandler.cpp
@@ -83,7 +83,7 @@ void CoapHandler::onDiscovered(QCoapResourceDiscoveryReply *reply, QList<QCoapRe
{
Q_UNUSED(reply)
- for (const QCoapResource &res : qAsConst(resources))
+ for (const QCoapResource &res : std::as_const(resources))
qCInfo(lcCoapClient) << "Discovered resource:" << res.path() << res.title();
}