aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/filesystemwatcher.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2022-10-07 14:46:06 +0200
committerMarc Mutz <[email protected]>2022-10-07 13:47:53 +0000
commit8eb4d52342fe3a6ede1c1dce3174d95bfa0cea88 (patch)
tree0f5556c5e4098e75853e3d9ee2620e0306f0cf2a /src/libs/utils/filesystemwatcher.cpp
parent90de29d530dfc2921d5179977b3393c11a3cc238 (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: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/libs/utils/filesystemwatcher.cpp')
-rw-r--r--src/libs/utils/filesystemwatcher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/utils/filesystemwatcher.cpp b/src/libs/utils/filesystemwatcher.cpp
index 602aaadf00a..7eb5db4692f 100644
--- a/src/libs/utils/filesystemwatcher.cpp
+++ b/src/libs/utils/filesystemwatcher.cpp
@@ -175,10 +175,10 @@ void FileSystemWatcherPrivate::autoReloadPostponed(bool postponed)
return;
m_postponed = postponed;
if (!postponed) {
- for (const QString &file : qAsConst(m_postponedFiles))
+ for (const QString &file : std::as_const(m_postponedFiles))
emit q->fileChanged(file);
m_postponedFiles.clear();
- for (const QString &directory : qAsConst(m_postponedDirectories))
+ for (const QString &directory : std::as_const(m_postponedDirectories))
emit q->directoryChanged(directory);
m_postponedDirectories.clear();
}
@@ -450,7 +450,7 @@ void FileSystemWatcher::slotDirectoryChanged(const QString &path)
toReadd.removeOne(rejected);
// If we've successfully added the file, that means it was deleted and replaced.
- for (const QString &reAdded : qAsConst(toReadd))
+ for (const QString &reAdded : std::as_const(toReadd))
d->fileChanged(reAdded);
}
}