summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-31 09:36:32 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-31 09:36:32 (GMT)
commit0c439d67f567ba2e7a1b9ada4e3953e5e598f168 (patch)
tree00801dada770fe63e3027df58d116edccfe07cfd /src/gui/dialogs
parentedd41ee5488716cf8336a7d8ea0cb3d48d0e7b14 (diff)
parent622a27c582f859274a5b9e40c625a6fda600b7b1 (diff)
downloadQt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.zip
Qt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.tar.gz
Qt-0c439d67f567ba2e7a1b9ada4e3953e5e598f168.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: configure doc/src/modules.qdoc src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicswidget.h
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 2f1933c..8a6190f 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1373,6 +1373,16 @@ QModelIndex QFileSystemModel::setRootPath(const QString &newPath)
if (!showDrives && !newPathDir.exists())
return d->index(rootPath());
+ //We remove the watcher on the previous path
+ if (!rootPath().isEmpty() && rootPath() != QLatin1String(".")) {
+ //This remove the watcher for the old rootPath
+ d->fileInfoGatherer.removePath(rootPath());
+ //This line "marks" the node as dirty, so the next fetchMore
+ //call on the path will ask the gatherer to install a watcher again
+ //But it doesn't re-fetch everything
+ d->node(rootPath())->populatedChildren = false;
+ }
+
// We have a new valid root path
d->rootDir = newPathDir;
QModelIndex newRootIndex;