summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-07-17 09:37:23 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-07-22 12:36:15 (GMT)
commit40276797e5a1e723826afe0c4d4cdeef99f1d309 (patch)
treebb5ecb9dce96ff3f3d7a0de98ba00a284f1c13a9
parent3e1476237996a99f7da77bd6abcfcd130c1bb126 (diff)
downloadQt-40276797e5a1e723826afe0c4d4cdeef99f1d309.zip
Qt-40276797e5a1e723826afe0c4d4cdeef99f1d309.tar.gz
Qt-40276797e5a1e723826afe0c4d4cdeef99f1d309.tar.bz2
Still fixing QDirIterator...
Setting nextFileInfo in the constructor would generate visible behavior changes on the first call to QDirIterator::hasNext(), and that's just wrong. Namely, fileName(), filePath() would return different results before and after calling hasNext(). Reviewed-by: Marius Storm-Olsen
-rw-r--r--src/corelib/io/qdiriterator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index df2b0c9..5f37bd7 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -133,14 +133,14 @@ public:
*/
QDirIteratorPrivate::QDirIteratorPrivate(const QString &path, const QStringList &nameFilters,
QDir::Filters filters, QDirIterator::IteratorFlags flags)
- : engine(0), path(path), nextFileInfo(path), iteratorFlags(flags),
+ : engine(0), path(path), iteratorFlags(flags),
filters(filters), nameFilters(nameFilters),
followNextDir(false), first(true), done(false)
{
if (QDir::NoFilter == filters)
this->filters = QDir::AllEntries;
- pushSubDirectory(nextFileInfo);
+ pushSubDirectory(QFileInfo(path));
}
/*!