aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
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-18 23:52:04 +0100
commit4979e677ebc2c85e09bc67939081f70cf78484d2 (patch)
tree354ce5a4fe65890263de45a55cce245dafeefc09 /tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
parent7a501ec6c82c8f8d5997b5d30e667d7820faed1c (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. 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>
Diffstat (limited to 'tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp')
-rw-r--r--tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
index a5efd3147e..9646e8004a 100644
--- a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
+++ b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
@@ -571,7 +571,7 @@ void tst_qqmljsscope::scriptIndices()
queue.push_back(c);
}
- for (const QmlIR::Object *irObject : qAsConst(document.objects)) {
+ for (const QmlIR::Object *irObject : std::as_const(document.objects)) {
const QString objectName = document.stringAt(irObject->inheritedTypeNameIndex);
for (auto it = irObject->functionsBegin(); it != irObject->functionsEnd(); ++it) {
QString name = document.stringAt(it->nameIndex);