diff options
Diffstat (limited to 'src/corelib/io')
-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 410753868e..2e01e1a857 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -62,11 +62,11 @@ QWindowsFileSystemWatcherEngine::Handle::Handle() QWindowsFileSystemWatcherEngine::~QWindowsFileSystemWatcherEngine() { - foreach(QWindowsFileSystemWatcherEngineThread *thread, threads) { + for (auto *thread : qAsConst(threads)) thread->stop(); + for (auto *thread : qAsConst(threads)) thread->wait(); - delete thread; - } + qDeleteAll(threads); } QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, |