summaryrefslogtreecommitdiffstats
path: root/src/designer/src/lib/shared/qtresourceview.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-25 12:33:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-30 11:40:54 +0200
commitbc40da956425f2025d6066ab52d5fd62233ba40a (patch)
treea40e55777aa81070331aacd8de1b038d5cd74050 /src/designer/src/lib/shared/qtresourceview.cpp
parentc816efd27782310510d35a2fb8c31eb22a7cd332 (diff)
Qt Designer: Use auto for iterators
Remove some typedefs. Pick-to: 6.5 Change-Id: Ib7c45fcb35491215a2798a53051ea044f1ae3707 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/designer/src/lib/shared/qtresourceview.cpp')
-rw-r--r--src/designer/src/lib/shared/qtresourceview.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/designer/src/lib/shared/qtresourceview.cpp b/src/designer/src/lib/shared/qtresourceview.cpp
index 66b6bc40b..ef4d8a509 100644
--- a/src/designer/src/lib/shared/qtresourceview.cpp
+++ b/src/designer/src/lib/shared/qtresourceview.cpp
@@ -422,21 +422,18 @@ void QtResourceViewPrivate::filterOutResources()
bool searchForNewPathWithContents = true;
if (!currentPath.isEmpty()) { // if the currentPath is empty we will search for a new path too
- QMap<QString, bool>::ConstIterator it = pathToMatchingContents.constFind(currentPath);
+ const auto it = pathToMatchingContents.constFind(currentPath);
if (it != pathToMatchingContents.constEnd() && it.value()) // the current item has contents, we don't need to search for another path
searchForNewPathWithContents = false;
}
if (searchForNewPathWithContents) {
// we find the first path with the matching contents
- QMap<QString, bool>::ConstIterator itContents = pathToMatchingContents.constBegin();
- while (itContents != pathToMatchingContents.constEnd()) {
+ for (auto itContents = pathToMatchingContents.cbegin(), cend = pathToMatchingContents.cend(); itContents != cend; ++itContents) {
if (itContents.value()) {
newCurrentPath = itContents.key(); // the new path will be activated
break;
}
-
- itContents++;
}
}