diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-05 16:47:13 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-08-05 16:47:13 +0200 |
commit | b53e08e3356528e7d240188c8985e205a6eaa2a2 (patch) | |
tree | 96936333023c58e0eb585efcc55be0ba787aa047 /src/widgets/dialogs/qfileinfogatherer.cpp | |
parent | c48484ea6d39909b7919577701ffeb9656bbea62 (diff) | |
parent | 0936bc54f907066644503c7d4c390968711c73a7 (diff) |
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets/dialogs/qfileinfogatherer.cpp')
-rw-r--r-- | src/widgets/dialogs/qfileinfogatherer.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index b08cc798e5..41b0b30eeb 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -146,6 +146,15 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr this->path.push(path); this->files.push(files); condition.wakeAll(); + +#ifndef QT_NO_FILESYSTEMWATCHER + if (files.isEmpty() + && !path.isEmpty() + && !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) { + if (!watcher->directories().contains(path)) + watcher->addPath(path); + } +#endif } /*! @@ -269,16 +278,6 @@ static QString translateDriveName(const QFileInfo &drive) */ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files) { -#ifndef QT_NO_FILESYSTEMWATCHER - if (files.isEmpty() - && !path.isEmpty() - && !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) { - QMutexLocker locker(&mutex); - if (!watcher->directories().contains(path)) - watcher->addPath(path); - } -#endif - // List drives if (path.isEmpty()) { #ifdef QT_BUILD_INTERNAL |