diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-09-13 15:50:27 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-09-15 10:29:15 (GMT) |
commit | a4bd280f48b1508912ae50e28b47f0f74fd08c37 (patch) | |
tree | 67daebc0db0b00ae9c8ff1c0bda9c8357f728bc7 /src/corelib/io/qfilesystemengine_symbian.cpp | |
parent | 0299d30d5aa35d532df6bc018afc52df263651a0 (diff) | |
download | Qt-a4bd280f48b1508912ae50e28b47f0f74fd08c37.zip Qt-a4bd280f48b1508912ae50e28b47f0f74fd08c37.tar.gz Qt-a4bd280f48b1508912ae50e28b47f0f74fd08c37.tar.bz2 |
Pass QFileSystemMetaData reference into QFileSystemEngine::canonicalName
On symbian, this allows us to use the cached ExistsAttribute
On symbian and unix, this allows us to update the caller's knowledge of
ExistsAttribute (potentially saving a stat later)
Reviewed-By: joao
Diffstat (limited to 'src/corelib/io/qfilesystemengine_symbian.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_symbian.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp index ca559da..9b81571 100644 --- a/src/corelib/io/qfilesystemengine_symbian.cpp +++ b/src/corelib/io/qfilesystemengine_symbian.cpp @@ -89,14 +89,15 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, } //static -QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry) +QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data) { if (entry.isEmpty() || entry.isRoot()) return entry; QFileSystemEntry result = absoluteName(entry); - QFileSystemMetaData meta; - if (!fillMetaData(result, meta, QFileSystemMetaData::ExistsAttribute) || !meta.exists()) { + if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute)) + fillMetaData(result, data, QFileSystemMetaData::ExistsAttribute); + if (!data.exists()) { // file doesn't exist return QFileSystemEntry(); } else { |