summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:42:43 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-06 18:20:23 +0200
commitd6dfdf3ad3f68a97fd4fc2843a5d5fb424193b4b (patch)
tree2a9f9447f0a904174ead25287b1313fe728257b8 /examples
parentc338447261878111df7198fbd96051926464e865 (diff)
downloadqttools-d6dfdf3ad3f68a97fd4fc2843a5d5fb424193b4b.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: I234704ba429750ddee958a82f6c941d041da0653 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/assistant/simpletextviewer/assistant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp
index 567f81f51..69e9b2d06 100644
--- a/examples/assistant/simpletextviewer/assistant.cpp
+++ b/examples/assistant/simpletextviewer/assistant.cpp
@@ -45,7 +45,7 @@ QString documentationDirectory()
paths.append(QLibraryInfo::path(QLibraryInfo::ExamplesPath));
paths.append(QCoreApplication::applicationDirPath());
paths.append(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation));
- for (const auto &dir : qAsConst(paths)) {
+ for (const auto &dir : std::as_const(paths)) {
const QString path = dir + QLatin1String("/documentation");
if (QFileInfo::exists(path))
return path;