From 0b6eb213882e95bb682145c8fdbaaf5ed9c13e54 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 10 Feb 2017 11:15:06 +0100 Subject: [PATCH] QmakeProject: Fix CentralFolderWatcher Make the loop actually iterate over something:-) Change-Id: I9e7ff40c3e5c3860a99bca15e381c1e12eed4d51 Reviewed-by: Tim Jenssen --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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;