diff options
author | João Abecasis <joao@abecasis.name> | 2009-07-16 11:01:05 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-07-17 17:05:04 (GMT) |
commit | af643f0612f7bd560ccb94cdce91395fc4c9acdb (patch) | |
tree | d168704533541dd2cfc00686dd85b79d20cfe09a | |
parent | c70fba2e0c2e00171baa46bbb0bb2e6ba0115ec6 (diff) | |
download | Qt-af643f0612f7bd560ccb94cdce91395fc4c9acdb.zip Qt-af643f0612f7bd560ccb94cdce91395fc4c9acdb.tar.gz Qt-af643f0612f7bd560ccb94cdce91395fc4c9acdb.tar.bz2 |
QDirIterator was returning inconsistent data
One less variable to maintain reduces the number of bugs and improves
consistency.
Reviewed-by: Olivier Goffart
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index 006b205..44ba950 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -119,7 +119,6 @@ public: QFileInfo nextFileInfo; //This fileinfo is the current that we will return from the public API QFileInfo currentFileInfo; - QString currentFilePath; QDirIterator::IteratorFlags iteratorFlags; QDir::Filters filters; QStringList nameFilters; @@ -188,10 +187,6 @@ void QDirIteratorPrivate::pushSubDirectory(const QString &path, const QStringLis */ void QDirIteratorPrivate::advance() { - // Store the current entry - if (!fileEngineIterators.isEmpty()) - currentFilePath = fileEngineIterators.top()->currentFilePath(); - // Advance to the next entry if (followNextDir) { // Start by navigating into the current directory. @@ -534,7 +529,7 @@ QString QDirIterator::fileName() const */ QString QDirIterator::filePath() const { - return d->currentFilePath; + return d->currentFileInfo.filePath(); } /*! |