Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QDirSortItemComparator Class Reference
+ Collaboration diagram for QDirSortItemComparator:

Public Member Functions

 QDirSortItemComparator (QDir::SortFlags flags, QCollator *coll=nullptr)
 
bool operator() (const QDirSortItem &, const QDirSortItem &) const
 
int compareStrings (const QString &a, const QString &b, Qt::CaseSensitivity cs) const
 

Detailed Description

Definition at line 212 of file qdir.cpp.

Constructor & Destructor Documentation

◆ QDirSortItemComparator()

QDirSortItemComparator::QDirSortItemComparator ( QDir::SortFlags flags,
QCollator * coll = nullptr )
inline

Definition at line 221 of file qdir.cpp.

References Qt::CaseInsensitive, QDir::IgnoreCase, QDir::LocaleAware, Q_ASSERT, and QCollator::setCaseSensitivity().

+ Here is the call graph for this function:

Member Function Documentation

◆ compareStrings()

int QDirSortItemComparator::compareStrings ( const QString & a,
const QString & b,
Qt::CaseSensitivity cs ) const
inline

Definition at line 237 of file qdir.cpp.

References QCollator::compare().

Referenced by operator()().

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

◆ operator()()

bool QDirSortItemComparator::operator() ( const QDirSortItem & n1,
const QDirSortItem & n2 ) const

Definition at line 247 of file qdir.cpp.

References Qt::CaseInsensitive, Qt::CaseSensitive, compareStrings(), QDir::DirsFirst, QDir::DirsLast, QDir::IgnoreCase, QFileInfo::isDir(), QDirSortItem::item, QDateTime::msecsTo(), QDir::Reversed, QDir::Size, QDir::SortByMask, QDir::Time, toInt(), QDir::Type, QDir::Unsorted, and QTimeZone::UTC.

+ Here is the call graph for this function:

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