diff options
author | Marc Mutz <[email protected]> | 2022-10-06 11:30:50 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2022-10-07 23:38:56 +0200 |
commit | c2d490a2385ea6f389340a296acaac0fa198c8b9 (patch) | |
tree | 5bc4dc681c9a9501cb9b2f39b8a1ab6e3d76ccfd /tools/qmljs/qmljs.cpp | |
parent | 958cd3ee1094a068b6d0ff27c73a4b3caff088ad (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: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <[email protected]>
Diffstat (limited to 'tools/qmljs/qmljs.cpp')
-rw-r--r-- | tools/qmljs/qmljs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index 07e0ea4c52..ae01e7560f 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) QV4::GlobalExtensions::init(vm.globalObject, QJSEngine::ConsoleExtension | QJSEngine::GarbageCollectionExtension); - for (const QString &fn : qAsConst(args)) { + for (const QString &fn : std::as_const(args)) { QV4::ScopedValue result(scope); if (runAsModule) { auto module = vm.loadModule(QUrl::fromLocalFile(QFileInfo(fn).absoluteFilePath())); |