diff options
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index d00570549..4b50477d9 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -350,6 +350,12 @@ private: QHash<QByteArray, QVariant> retrieveData(const KFileItem& item, const ItemData* parent) const; /** + * @return True if \a a has a KFileItem whose text is 'less than' the one + * of \a b according to QString::operator<(const QString&). + */ + static bool nameLessThan(const ItemData* a, const ItemData* b); + + /** * @return True if the item-data \a a should be ordered before the item-data * \b. The item-data may have different parent-items. */ @@ -485,6 +491,12 @@ private: friend class DolphinPart; // Accesses m_dirLister }; +inline bool KFileItemModel::nameLessThan(const ItemData* a, const ItemData* b) +{ + return a->item.text() < b->item.text(); +} + + inline bool KFileItemModel::isChildItem(int index) const { if (m_itemData.at(index)->parent) { |
