summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-07-16 17:11:30 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-07-22 12:36:15 (GMT)
commit3e1476237996a99f7da77bd6abcfcd130c1bb126 (patch)
tree2565969dd0ce13021d234013079d0dcdc9e54d38 /src/corelib
parent316fec414c651fb4c5dc9666344219b0137e704f (diff)
downloadQt-3e1476237996a99f7da77bd6abcfcd130c1bb126.zip
Qt-3e1476237996a99f7da77bd6abcfcd130c1bb126.tar.gz
Qt-3e1476237996a99f7da77bd6abcfcd130c1bb126.tar.bz2
QDirIterator cleanup
The authoritative copy of filters and nameFilters is available, there is no need to get this from the file engine iterators. Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdiriterator.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index f36320e..df2b0c9 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -106,8 +106,7 @@ public:
QDir::Filters filters, QDirIterator::IteratorFlags flags);
~QDirIteratorPrivate();
- void pushSubDirectory(const QFileInfo &fileInfo, const QStringList &nameFilters,
- QDir::Filters filters);
+ void pushSubDirectory(const QFileInfo &fileInfo);
void advance();
bool shouldFollowDirectory(const QFileInfo &);
bool matchesFilters(const QString &fileName, const QFileInfo &fi) const;
@@ -141,7 +140,7 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QString &path, const QStringList
if (QDir::NoFilter == filters)
this->filters = QDir::AllEntries;
- pushSubDirectory(nextFileInfo, nameFilters, filters);
+ pushSubDirectory(nextFileInfo);
}
/*!
@@ -155,8 +154,7 @@ QDirIteratorPrivate::~QDirIteratorPrivate()
/*!
\internal
*/
-void QDirIteratorPrivate::pushSubDirectory(const QFileInfo &fileInfo, const QStringList &nameFilters,
- QDir::Filters filters)
+void QDirIteratorPrivate::pushSubDirectory(const QFileInfo &fileInfo)
{
QString path = fileInfo.filePath();
@@ -189,7 +187,7 @@ void QDirIteratorPrivate::advance()
if (followNextDir) {
// Start by navigating into the current directory.
QAbstractFileEngineIterator *it = fileEngineIterators.top();
- pushSubDirectory(it->currentFileInfo(), it->nameFilters(), it->filters());
+ pushSubDirectory(it->currentFileInfo());
followNextDir = false;
}
@@ -210,7 +208,7 @@ void QDirIteratorPrivate::advance()
return;
} else if (shouldFollowDirectory(info)) {
- pushSubDirectory(info, it->nameFilters(), it->filters());
+ pushSubDirectory(info);
foundDirectory = true;
break;
}