diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-31 01:14:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-31 01:14:14 (GMT) |
commit | 622a27c582f859274a5b9e40c625a6fda600b7b1 (patch) | |
tree | 6f52745b6eeb479fe1d5e23ebc205661508960e3 /src/gui/dialogs/qfilesystemmodel.cpp | |
parent | 4dd2bbe5da43fe26bbe75edd27e02eefae6b82d4 (diff) | |
parent | 880e4935410769b8337d75f219bef70493c4bb2c (diff) | |
download | Qt-622a27c582f859274a5b9e40c625a6fda600b7b1.zip Qt-622a27c582f859274a5b9e40c625a6fda600b7b1.tar.gz Qt-622a27c582f859274a5b9e40c625a6fda600b7b1.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Revert "Add a children private property needed for QML to support QGraphicsObject"
Revert "struct -> class, it's better."
Revert "Add NOTIFY to size property so QML bindings are working fine."
Revert "Better handling for NOTIFY in QGraphicsWidget regarding geometry changes"
Revert "Add a a layout property in QGraphicsWidget."
Add a workaround for a bug in Mac filesystem watcher.
Another "off by 1" problem in OpenVG - in paths this time.
Doc: Added links and notes to modules, ActiveQt and XMLPatterns docs.
Compile on MingW
struct -> class, it's better.
Add a a layout property in QGraphicsWidget.
Fix QFileSystemModel to not install useless watchers on the filesystem
Diffstat (limited to 'src/gui/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/gui/dialogs/qfilesystemmodel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 6fd947c..24faa59 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -1361,6 +1361,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; |