summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfileinfogatherer.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-24 14:03:55 (GMT)
committeraxis <qt-info@nokia.com>2009-04-27 07:09:01 (GMT)
commite74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch)
tree3a131f9235fb6a455793178d8313655e4fd0036e /src/gui/dialogs/qfileinfogatherer.cpp
parent8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff)
parent211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff)
downloadQt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.zip
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.gz
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
Diffstat (limited to 'src/gui/dialogs/qfileinfogatherer.cpp')
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp
index 7b849f7..a2abe54 100644
--- a/src/gui/dialogs/qfileinfogatherer.cpp
+++ b/src/gui/dialogs/qfileinfogatherer.cpp
@@ -168,6 +168,20 @@ void QFileInfoGatherer::clear()
}
/*
+ Remove a \a path from the watcher
+
+ \sa listed()
+*/
+void QFileInfoGatherer::removePath(const QString &path)
+{
+#ifndef QT_NO_FILESYSTEMWATCHER
+ mutex.lock();
+ watcher->removePath(path);
+ mutex.unlock();
+#endif
+}
+
+/*
List all files in \a directoryPath
\sa listed()
@@ -288,15 +302,9 @@ QString QFileInfoGatherer::translateDriveName(const QFileInfo &drive) const
void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
{
#ifndef QT_NO_FILESYSTEMWATCHER
- //### We test here if the path still exist before adding it in the watcher
- //### because sometime the file is deleted just before enter here so QStringList files is not up to date
- //### It is not a proper fix, perhaps in 4.6 we should have a better way to avoid that
- //### to ensure the gatherer have fresh information
- QFileInfo info(path);
if (files.isEmpty()
&& !watcher->directories().contains(path)
&& !path.isEmpty()
- && info.exists()
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
watcher->addPath(path);
}