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 <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
15953e9503
commit
2480ebb50b
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user