diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2016-01-10 23:44:20 +0000 |
---|---|---|
committer | Sérgio Martins <iamsergio@gmail.com> | 2016-02-10 20:35:52 +0000 |
commit | 2c9f6b1a1806e1ff512c85fb2aaffb16c0f51a82 (patch) | |
tree | cf931768ef6c7cc03552f271bd557ae7e2466e3b /src/corelib/io/qfilesystemwatcher_win.cpp | |
parent | e395bda9a5e9a65a76f46d91d0b48ebc97d31087 (diff) |
Fix usage of QMutexLocker, destroy it only at end of scope
Change-Id: I87f2c433c987b5f7b4680639cae51cdf6ce9ddc6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_win.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index 410753868e..582aa3bbe9 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -165,7 +165,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, // now look for a thread to insert bool found = false; foreach(QWindowsFileSystemWatcherEngineThread *thread, threads) { - QMutexLocker(&(thread->mutex)); + QMutexLocker locker(&(thread->mutex)); if (thread->handles.count() < MAXIMUM_WAIT_OBJECTS) { DEBUG() << "Added handle" << handle.handle << "for" << absolutePath << "to watch" << fileInfo.absoluteFilePath() << "to existing thread " << thread; |