diff options
author | Thomas Zander <t.zander@nokia.com> | 2010-10-11 14:50:09 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-12 12:59:04 (GMT) |
commit | aa117bb48971c2fe56aff1e678ee3a7f6358eb0d (patch) | |
tree | 7a23c0a5ff9416616d54c334c936697f2117d728 /src | |
parent | 75016a4a3bb2ae536a3a813f0ef410b1a0c83742 (diff) | |
download | Qt-aa117bb48971c2fe56aff1e678ee3a7f6358eb0d.zip Qt-aa117bb48971c2fe56aff1e678ee3a7f6358eb0d.tar.gz Qt-aa117bb48971c2fe56aff1e678ee3a7f6358eb0d.tar.bz2 |
Fix caching of metadata in QDir to not change behavior
In 4.7 and before a QDir::exists() always stats and a refresh() call would
flush metadata, restore this behavior again.
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qdir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index eb78e25..e9bc012 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -131,9 +131,8 @@ QDirPrivate::QDirPrivate(const QDirPrivate ©) bool QDirPrivate::exists() const { if (fileEngine.isNull()) { - if (!metaData.hasFlags(QFileSystemMetaData::ExistsAttribute | QFileSystemMetaData::DirectoryType)) - QFileSystemEngine::fillMetaData(dirEntry, metaData, - QFileSystemMetaData::ExistsAttribute | QFileSystemMetaData::DirectoryType); + QFileSystemEngine::fillMetaData(dirEntry, metaData, + QFileSystemMetaData::ExistsAttribute | QFileSystemMetaData::DirectoryType); // always stat return metaData.exists() && metaData.isDirectory(); } const QAbstractFileEngine::FileFlags info = @@ -2100,6 +2099,7 @@ bool QDir::isRelativePath(const QString &path) void QDir::refresh() const { QDirPrivate *d = const_cast<QDir*>(this)->d_ptr.data(); + d->metaData.clear(); d->initFileEngine(); d->clearFileLists(); } |