fix size column sorting

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-06-09 23:53:40 +03:00
parent 34e1a5e660
commit 242ddbb7e1
9 changed files with 48 additions and 62 deletions

View File

@ -55,10 +55,11 @@ class Resource : public QObject {
* > 0: 'this' comes after 'other'
* = 0: 'this' is equal to 'other'
* < 0: 'this' comes before 'other'
*
* The second argument in the pair is true if the sorting type that decided which one is greater was 'type'.
* the order is used to force items to be allways at top and not used for sorting
*/
[[nodiscard]] virtual auto compare(Resource const& other, SortType type = SortType::NAME) const -> std::pair<int, bool>;
[[nodiscard]] virtual int compare(Resource const& other,
SortType type = SortType::NAME,
Qt::SortOrder order = Qt::SortOrder::AscendingOrder) const;
/** Returns whether the given filter should filter out 'this' (false),
* or if such filter includes the Resource (true).