aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml/main.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 /tools/qml/main.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 'tools/qml/main.cpp')
-rw-r--r--tools/qml/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 98fefcb838..9ad2abe781 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -236,7 +236,7 @@ public Q_SLOTS:
if (o) {
checkForWindow(o);
if (conf && qae)
- for (PartialScene *ps : qAsConst(conf->completers))
+ for (PartialScene *ps : std::as_const(conf->completers))
if (o->inherits(ps->itemType().toUtf8().constData()))
contain(o, ps->container());
}
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
}
#endif
- for (const QString &path : qAsConst(files)) {
+ for (const QString &path : std::as_const(files)) {
QUrl url = QUrl::fromUserInput(path, QDir::currentPath(), QUrl::AssumeLocalFile);
if (verboseMode)
printf("qml: loading %s\n", qPrintable(url.toString()));