diff options
Diffstat (limited to 'framework/domain/folderlistmodel.h')
-rw-r--r-- | framework/domain/folderlistmodel.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/domain/folderlistmodel.h b/framework/domain/folderlistmodel.h index d30393db..a2adc9a9 100644 --- a/framework/domain/folderlistmodel.h +++ b/framework/domain/folderlistmodel.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #pragma once | 21 | #pragma once |
22 | 22 | ||
23 | #include <QObject> | 23 | #include <QObject> |
24 | #include <QIdentityProxyModel> | 24 | #include <QSortFilterProxyModel> |
25 | #include <QSharedPointer> | 25 | #include <QSharedPointer> |
26 | #include <QStringList> | 26 | #include <QStringList> |
27 | 27 | ||
@@ -29,7 +29,7 @@ namespace Sink { | |||
29 | class Query; | 29 | class Query; |
30 | } | 30 | } |
31 | 31 | ||
32 | class FolderListModel : public QIdentityProxyModel | 32 | class FolderListModel : public QSortFilterProxyModel |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
@@ -39,7 +39,7 @@ public: | |||
39 | FolderListModel(QObject *parent = Q_NULLPTR); | 39 | FolderListModel(QObject *parent = Q_NULLPTR); |
40 | ~FolderListModel(); | 40 | ~FolderListModel(); |
41 | 41 | ||
42 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; | 42 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; |
43 | 43 | ||
44 | enum Roles { | 44 | enum Roles { |
45 | Name = Qt::UserRole + 1, | 45 | Name = Qt::UserRole + 1, |
@@ -49,10 +49,12 @@ public: | |||
49 | }; | 49 | }; |
50 | Q_ENUMS(Roles) | 50 | Q_ENUMS(Roles) |
51 | 51 | ||
52 | QHash<int, QByteArray> roleNames() const; | 52 | QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; |
53 | 53 | ||
54 | void setAccountId(const QVariant &accountId); | 54 | void setAccountId(const QVariant &accountId); |
55 | QVariant accountId() const; | 55 | QVariant accountId() const; |
56 | protected: | ||
57 | bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; | ||
56 | 58 | ||
57 | private: | 59 | private: |
58 | void runQuery(const Sink::Query &query); | 60 | void runQuery(const Sink::Query &query); |