From 2480ebb50bc0aabb7f84d5856436acc282f98b11 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 7 Aug 2012 19:36:01 +0200 Subject: [PATCH] QFileInfoGatherer: remove useless locks The m_iconProvider and m_resolveSymlinks members are only ever accessed from getInfo(), which is not called from run(). So the mutex-lockers aren't needed in the setters. Change-Id: I3257c95366528c5c66352d20a09e8a43b811f3ba Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz --- src/widgets/dialogs/qfileinfogatherer.cpp | 2 -- src/widgets/dialogs/qfileinfogatherer_p.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index 6bf4106c37..d1718bb5bf 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -102,7 +102,6 @@ void QFileInfoGatherer::setResolveSymlinks(bool enable) { Q_UNUSED(enable); #ifdef Q_OS_WIN - QMutexLocker locker(&mutex); m_resolveSymlinks = enable; #endif } @@ -114,7 +113,6 @@ bool QFileInfoGatherer::resolveSymlinks() const void QFileInfoGatherer::setIconProvider(QFileIconProvider *provider) { - QMutexLocker locker(&mutex); m_iconProvider = provider; } diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h index b6dd3cf62e..e3bfb067f6 100644 --- a/src/widgets/dialogs/qfileinfogatherer_p.h +++ b/src/widgets/dialogs/qfileinfogatherer_p.h @@ -191,8 +191,8 @@ private: #ifndef QT_NO_FILESYSTEMWATCHER QFileSystemWatcher *watcher; #endif - bool m_resolveSymlinks; - QFileIconProvider *m_iconProvider; + bool m_resolveSymlinks; // not accessed by run() + QFileIconProvider *m_iconProvider; // not accessed by run() QFileIconProvider defaultProvider; }; #endif // QT_NO_FILESYSTEMMODEL