summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemiterator_p.h
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-09-10 17:43:23 +0200
committerJoão Abecasis <joao.abecasis@nokia.com>2010-09-10 19:13:12 +0200
commitce74c076062c84f183f72947730db7b0e2d5ab54 (patch)
tree3a25cd88c846e131a6d6f5a570ee5fd96a48f9fd /src/corelib/io/qfilesystemiterator_p.h
parent8f40161a7932e901a9f6fe59b5b3d2666c5482c5 (diff)
Refactored QFSFileEngineIterator/Unix
into new internal native iterators. QFSFileEngineIterator will use that internally, currently only on non-windows platforms. This implementation can be reused on Windows once the native iterators are in place there as well. Reviewed-by: Shane Kearns
Diffstat (limited to 'src/corelib/io/qfilesystemiterator_p.h')
-rw-r--r--src/corelib/io/qfilesystemiterator_p.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemiterator_p.h b/src/corelib/io/qfilesystemiterator_p.h
index ed1ef5ee77..d3b195d8af 100644
--- a/src/corelib/io/qfilesystemiterator_p.h
+++ b/src/corelib/io/qfilesystemiterator_p.h
@@ -66,6 +66,7 @@
#elif defined (Q_OS_SYMBIAN)
#include <f32file.h>
#else
+#include <QtCore/qscopedpointer.h>
#endif
QT_BEGIN_NAMESPACE
@@ -73,12 +74,15 @@ QT_BEGIN_NAMESPACE
class QFileSystemIterator
{
public:
- QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters, const QStringList &nameFilters, QDirIterator::IteratorFlags flags);
+ QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters,
+ const QStringList &nameFilters, QDirIterator::IteratorFlags flags
+ = QDirIterator::FollowSymlinks | QDirIterator::Subdirectories);
~QFileSystemIterator();
bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData);
private:
+ QFileSystemEntry::NativePath nativePath;
// Platform-specific data
#if defined(Q_OS_WIN)
@@ -88,6 +92,13 @@ private:
TInt lastError;
TInt entryIndex;
#else
+ QT_DIR *dir;
+ QT_DIRENT *dirEntry;
+#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN)
+ // for readdir_r
+ QScopedPointer<QT_DIRENT, QScopedPointerPodDeleter> mt_file;
+#endif
+ int lastError;
#endif
Q_DISABLE_COPY(QFileSystemIterator)