summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-07-16 16:27:11 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-07-22 12:36:14 (GMT)
commitbe1d9a4288e2b17a3d5a699da229076682ef99bd (patch)
treecfbe9e439c7a6b63b3bb1fef77b43c22667bb5a0
parent5ef9227a5931e87cd18354967013056ef59405ca (diff)
downloadQt-be1d9a4288e2b17a3d5a699da229076682ef99bd.zip
Qt-be1d9a4288e2b17a3d5a699da229076682ef99bd.tar.gz
Qt-be1d9a4288e2b17a3d5a699da229076682ef99bd.tar.bz2
QDirIterator: refactor initializations in private constructor
There's no need for initializing variables twice. Reviewed-by: Marius Storm-Olsen
-rw-r--r--src/corelib/io/qdiriterator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index c9c80bb..7de0a0b 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -134,12 +134,12 @@ public:
*/
QDirIteratorPrivate::QDirIteratorPrivate(const QString &path, const QStringList &nameFilters,
QDir::Filters filters, QDirIterator::IteratorFlags flags)
- : engine(0), path(path), nextFileInfo(path), iteratorFlags(flags), followNextDir(false), first(true), done(false)
+ : engine(0), path(path), nextFileInfo(path), iteratorFlags(flags),
+ filters(filters), nameFilters(nameFilters),
+ followNextDir(false), first(true), done(false)
{
- if (filters == QDir::NoFilter)
- filters = QDir::AllEntries;
- this->filters = filters;
- this->nameFilters = nameFilters;
+ if (QDir::NoFilter == filters)
+ this->filters = QDir::AllEntries;
pushSubDirectory(nextFileInfo, nameFilters, filters);
}