diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 222cbe216eb..984d50afa89 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1055,9 +1055,8 @@ void CentralizedFolderWatcher::unwatchFolders(const QList &folders, Qma // So the rwf is a subdirectory of a folder we aren't watching // but maybe someone else wants us to watch bool needToWatch = false; - QMultiMap::const_iterator it, end; - end = m_map.constEnd(); - for (it = m_map.constEnd(); it != end; ++it) { + auto end = m_map.constEnd(); + for (auto it = m_map.constBegin(); it != end; ++it) { if (rwf.startsWith(it.key())) { needToWatch = true; break;