Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QDirIteratorPrivate Class Reference
+ Collaboration diagram for QDirIteratorPrivate:

Public Member Functions

 QDirIteratorPrivate (const QFileSystemEntry &entry, const QStringList &nameFilters, QDir::Filters _filters, QDirIterator::IteratorFlags flags, bool resolveEngine=true)
 
void advance ()
 
bool entryMatches (const QString &fileName, const QFileInfo &fileInfo)
 
void pushDirectory (const QFileInfo &fileInfo)
 
void checkAndPushDirectory (const QFileInfo &)
 
bool matchesFilters (const QString &fileName, const QFileInfo &fi) const
 

Public Attributes

std::unique_ptr< QAbstractFileEngineengine
 
QFileSystemEntry dirEntry
 
const QStringList nameFilters
 
const QDir::Filters filters
 
const QDirIterator::IteratorFlags iteratorFlags
 
QDirIteratorPrivateIteratorStack< QAbstractFileEngineIteratorfileEngineIterators
 
QDirIteratorPrivateIteratorStack< QFileSystemIteratornativeIterators
 
QFileInfo currentFileInfo
 
QFileInfo nextFileInfo
 
QDuplicateTracker< QStringvisitedLinks
 

Detailed Description

Definition at line 90 of file qdiriterator.cpp.

Constructor & Destructor Documentation

◆ QDirIteratorPrivate()

QDirIteratorPrivate::QDirIteratorPrivate ( const QFileSystemEntry entry,
const QStringList nameFilters,
QDir::Filters  _filters,
QDirIterator::IteratorFlags  flags,
bool  resolveEngine = true 
)

Definition at line 129 of file qdiriterator.cpp.

References advance(), Qt::CaseInsensitive, Qt::CaseSensitive, QDir::CaseSensitive, dirEntry, engine, filters, QRegularExpression::fromWildcard(), nameFilters, pushDirectory(), and QFileSystemEngine::resolveEntryAndCreateLegacyEngine().

+ Here is the call graph for this function:

Member Function Documentation

◆ advance()

void QDirIteratorPrivate::advance ( )

Definition at line 210 of file qdiriterator.cpp.

References currentFileInfo, engine, entryMatches(), fileEngineIterators, QFileSystemEntry::fileName(), info, QList< T >::isEmpty(), it, nativeIterators, nextFileInfo, QStack< T >::pop(), and QStack< T >::top().

Referenced by QDirIteratorPrivate(), QDirIterator::next(), and QDirIterator::nextFileInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkAndPushDirectory()

void QDirIteratorPrivate::checkAndPushDirectory ( const QFileInfo fileInfo)

Definition at line 254 of file qdiriterator.cpp.

References QDir::AllDirs, QFileInfo::fileName(), fileName, filters, QDirIterator::FollowSymlinks, QDir::Hidden, QFileInfo::isDir(), QFileInfo::isHidden(), QFileInfo::isSymLink(), iteratorFlags, pushDirectory(), and QDirIterator::Subdirectories.

Referenced by entryMatches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entryMatches()

bool QDirIteratorPrivate::entryMatches ( const QString fileName,
const QFileInfo fileInfo 
)
inline

Definition at line 192 of file qdiriterator.cpp.

References checkAndPushDirectory(), currentFileInfo, fileName, matchesFilters(), and nextFileInfo.

Referenced by advance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchesFilters()

bool QDirIteratorPrivate::matchesFilters ( const QString fileName,
const QFileInfo fi 
) const

This convenience function implements the iterator's filtering logics and applies then to the current directory entry.

It returns true if the current entry matches the filters (i.e., the current entry will be returned as part of the directory iteration); otherwise, false is returned.

Definition at line 291 of file qdiriterator.cpp.

References QDir::AllDirs, QDir::Dirs, QDir::Executable, QFileInfo::exists(), fi, fileName, QDir::Files, filters, QDir::Hidden, QFileInfo::isDir(), QFileInfo::isExecutable(), QFileInfo::isFile(), QFileInfo::isHidden(), QFileInfo::isReadable(), QFileInfo::isSymLink(), QFileInfo::isWritable(), nameFilters, QDir::NoDot, QDir::NoDotDot, QDir::NoSymLinks, QDir::PermissionMask, QDir::Readable, QDir::System, and QDir::Writable.

Referenced by entryMatches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pushDirectory()

void QDirIteratorPrivate::pushDirectory ( const QFileInfo fileInfo)

Definition at line 157 of file qdiriterator.cpp.

References QFileInfo::canonicalFilePath(), QFileInfo::d_ptr, engine, fileEngineIterators, QFileInfoPrivate::fileEntry, QFileInfo::filePath(), filters, QDirIterator::FollowSymlinks, QDuplicateTracker< T, Prealloc >::hasSeen(), QFileInfo::isSymLink(), it, iteratorFlags, nameFilters, nativeIterators, qWarning, and visitedLinks.

Referenced by QDirIteratorPrivate(), and checkAndPushDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ currentFileInfo

QFileInfo QDirIteratorPrivate::currentFileInfo

◆ dirEntry

QFileSystemEntry QDirIteratorPrivate::dirEntry

Definition at line 105 of file qdiriterator.cpp.

Referenced by QDirIteratorPrivate(), and QDirIterator::path().

◆ engine

std::unique_ptr<QAbstractFileEngine> QDirIteratorPrivate::engine

◆ fileEngineIterators

QDirIteratorPrivateIteratorStack<QAbstractFileEngineIterator> QDirIteratorPrivate::fileEngineIterators

Definition at line 114 of file qdiriterator.cpp.

Referenced by advance(), QDirIterator::hasNext(), and pushDirectory().

◆ filters

const QDir::Filters QDirIteratorPrivate::filters

◆ iteratorFlags

const QDirIterator::IteratorFlags QDirIteratorPrivate::iteratorFlags

Definition at line 108 of file qdiriterator.cpp.

Referenced by checkAndPushDirectory(), and pushDirectory().

◆ nameFilters

const QStringList QDirIteratorPrivate::nameFilters

Definition at line 106 of file qdiriterator.cpp.

Referenced by QDirIteratorPrivate(), matchesFilters(), and pushDirectory().

◆ nativeIterators

QDirIteratorPrivateIteratorStack<QFileSystemIterator> QDirIteratorPrivate::nativeIterators

Definition at line 116 of file qdiriterator.cpp.

Referenced by advance(), QDirIterator::hasNext(), and pushDirectory().

◆ nextFileInfo

QFileInfo QDirIteratorPrivate::nextFileInfo

Definition at line 120 of file qdiriterator.cpp.

Referenced by advance(), and entryMatches().

◆ visitedLinks

QDuplicateTracker<QString> QDirIteratorPrivate::visitedLinks

Definition at line 123 of file qdiriterator.cpp.

Referenced by pushDirectory().


The documentation for this class was generated from the following file: