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; diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index aeb4f903db..2d75e1720a 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -737,7 +737,7 @@ inline QUrl QWindowsFileDialogSharedData::directory() const inline void QWindowsFileDialogSharedData::setDirectory(const QUrl &d) { - QMutexLocker (&m_data->mutex); + QMutexLocker locker(&m_data->mutex); m_data->directory = d; } @@ -751,7 +751,7 @@ inline QString QWindowsFileDialogSharedData::selectedNameFilter() const inline void QWindowsFileDialogSharedData::setSelectedNameFilter(const QString &f) { - QMutexLocker (&m_data->mutex); + QMutexLocker locker(&m_data->mutex); m_data->selectedNameFilter = f; } @@ -771,13 +771,13 @@ inline QString QWindowsFileDialogSharedData::selectedFile() const inline void QWindowsFileDialogSharedData::setSelectedFiles(const QList &urls) { - QMutexLocker (&m_data->mutex); + QMutexLocker locker(&m_data->mutex); m_data->selectedFiles = urls; } inline void QWindowsFileDialogSharedData::fromOptions(const QSharedPointer &o) { - QMutexLocker (&m_data->mutex); + QMutexLocker locker(&m_data->mutex); m_data->directory = o->initialDirectory(); m_data->selectedFiles = o->initiallySelectedFiles(); m_data->selectedNameFilter = o->initiallySelectedNameFilter();