X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/cd2e64154fd5446a7e19aff4cb147efe2f2ba31e..dd07a327:/src/kitemviews/kfileitemmodel.h diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 3c2721d8f..10be27128 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -109,6 +109,8 @@ public: bool supportsDropping(int index) const override; + bool canEnterOnHover(int index) const override; + QString roleDescription(const QByteArray &role) const override; QList> groups() const override; @@ -256,7 +258,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 @@ -363,7 +365,11 @@ private: ItemData *parent; }; - enum RemoveItemsBehavior { KeepItemData, DeleteItemData, DeleteItemDataIfUnfiltered }; + enum RemoveItemsBehavior { + KeepItemData, + DeleteItemData, + DeleteItemDataIfUnfiltered + }; void insertItems(QList &items); void removeItems(const KItemRangeList &itemRanges, RemoveItemsBehavior behavior); @@ -462,6 +468,8 @@ private: */ bool isChildItem(int index) const; + void scheduleResortAllItems(); + /** * Is invoked by KFileItemModelRolesUpdater and results in emitting the * sortProgress signal with a percent-value of the progress. @@ -584,7 +592,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