summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 31c6b747a7..5d8a5b3682 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -430,8 +430,9 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
FindCloseChangeNotification(hit.value().handle);
thread->handles[index] = hit.value().handle = fileHandle;
hit.value().flags = flags;
- thread->pathInfoForHandle.insert(fileHandle, pit.value());
+ auto value = std::move(*pit);
thread->pathInfoForHandle.erase(pit);
+ thread->pathInfoForHandle.insert(fileHandle, std::move(value));
}
}
// In addition, check on flags for sufficient notification attributes