]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodel.h
Merge remote-tracking branch 'upstream/master' into work/zakharafoniam/useful-groups
[dolphin.git] / src / kitemviews / kfileitemmodel.h
index f89eae9469976709aab6a79b62fa0e00a9d4e004..980efe66b26c1108a06996c36683d4d75ed83a50 100644 (file)
@@ -211,6 +211,13 @@ public:
      */
     static QList<RoleInfo> rolesInformation();
 
+    /**
+     * @return Provides static information for all available grouping
+     *         behaviors supported by KFileItemModel but not directly
+     *         mapped to roles of KFileItemModel.
+     */
+    static QList<RoleInfo> extraGroupingInformation();
+
     /** set to true to hide application/x-trash files */
     void setShowTrashMime(bool show);
 
@@ -265,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
@@ -293,9 +300,9 @@ Q_SIGNALS:
 protected:
     void onGroupedSortingChanged(bool current) override;
     void onSortRoleChanged(const QByteArray &current, const QByteArray &previous, bool resortItems = true) override;
-    void onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous, bool resortItems = true) override;
+    void onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous) override;
     void onGroupRoleChanged(const QByteArray &current, const QByteArray &previous, bool resortItems = true) override;
-    void onGroupOrderChanged(Qt::SortOrder current, Qt::SortOrder previous, bool resortItems = true) override;
+    void onGroupOrderChanged(Qt::SortOrder current, Qt::SortOrder previous) override;
 
 private Q_SLOTS:
     /**
@@ -396,6 +403,12 @@ private:
      */
     QList<ItemData *> createItemDataList(const QUrl &parentUrl, const KFileItemList &items) const;
 
+    /**
+     * Helper method for prepareItemsForSorting(). 
+     * For a set role, fills 'values' of ItemData non-lazily.
+     */
+    void prepareItemsWithRole(QList<ItemData *> &itemDataList, RoleType roleType);
+
     /**
      * Prepares the items for sorting. Normally, the hash 'values' in ItemData is filled
      * lazily to save time and memory, but for some sort roles, it is expected that the