summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:13:47 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-06 17:30:25 +0200
commitc2a9c3827bcd396a52812c528e3257b3581156b0 (patch)
tree2613b67d7c1f19de2d1440ab53c1a81c2d281067 /tools
parent7848d23be6181573c5fe7dbe2bc5d604e66f8e4e (diff)
downloadqtactiveqt-c2a9c3827bcd396a52812c528e3257b3581156b0.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: I7d7d21564161807692941b12085686711583d556 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/dumpcpp/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index 71d4a43..9820a76 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -815,7 +815,7 @@ bool generateTypeLibrary(QString typeLibFile, QString outname,
declOut << '}' << Qt::endl << Qt::endl;
}
}
- for (const QByteArray &opaquePointerType : qAsConst(opaquePointerTypes))
+ for (const QByteArray &opaquePointerType : std::as_const(opaquePointerTypes))
declOut << "Q_DECLARE_OPAQUE_POINTER(" << opaquePointerType << "*)" << Qt::endl;
declOut << Qt::endl;
}