X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f1da070fd5845dbbdd5e20addffafe8c9929b3c9..refs/heads/master:/src/kitemviews/kfileitemmodel.h diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 001c84701..13554d8c7 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -272,7 +272,7 @@ Q_SIGNALS: * Is emitted if an error message (e.g. "Unknown location") * should be shown. */ - void errorMessage(const QString &message); + void errorMessage(const QString &message, const int kioErrorCode); /** * Is emitted if a redirection from the current URL \a oldUrl @@ -380,7 +380,7 @@ private: QHash values; ItemData *parent; }; - + struct ItemGroupInfo { int comparable; QString text; @@ -639,7 +639,9 @@ inline bool KFileItemModel::isRoleValueNatural(RoleType roleType) inline bool KFileItemModel::nameLessThan(const ItemData *a, const ItemData *b) { - return a->item.text() < b->item.text(); + // Split extension, taking into account it can be empty + constexpr QString::SectionFlags flags = QString::SectionSkipEmpty | QString::SectionIncludeLeadingSep; + return a->item.text().section('.', 0, 0, flags) < b->item.text().section('.', 0, 0, flags); } inline bool KFileItemModel::isChildItem(int index) const