diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /src/corelib/io/qfilesystemwatcher_win.cpp | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_win.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index c568369a06..bdbd3ba868 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -695,9 +695,8 @@ void QWindowsFileSystemWatcherEngineThread::run() qErrnoWarning(error, "%ls", qUtf16Printable(msgFindNextFailed(h))); } - QMutableHashIterator<QFileSystemWatcherPathKey, QWindowsFileSystemWatcherEngine::PathInfo> it(h); - while (it.hasNext()) { - QWindowsFileSystemWatcherEngineThread::PathInfoHash::iterator x = it.next(); + for (auto it = h.begin(), end = h.end(); it != end; /*erasing*/ ) { + auto x = it++; QString absolutePath = x.value().absolutePath; QFileInfo fileInfo(x.value().path); DEBUG() << "checking" << x.key(); @@ -723,6 +722,7 @@ void QWindowsFileSystemWatcherEngineThread::run() handleForDir.remove(QFileSystemWatcherPathKey(absolutePath)); // h is now invalid + break; } } else if (x.value().isDir) { DEBUG() << x.key() << "directory changed!"; |