diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-21 12:11:49 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-21 12:11:49 +0100 |
commit | 0c91d01eb26793e745138c4598cf15d9a21c0136 (patch) | |
tree | 53ffeb02eaf1625598e937444430e4040e17b0a4 /framework/domain/maillistmodel.cpp | |
parent | ed09c7689f7435761611cbfd3cda98bbd79c3a5e (diff) | |
download | kube-0c91d01eb26793e745138c4598cf15d9a21c0136.tar.gz kube-0c91d01eb26793e745138c4598cf15d9a21c0136.zip |
Filtering for maillistmodel and peoplemodel
Works surprisingly well and is very useful for testing.
The searchbar in the maillistmodel is a temporary solution as the global
searchbar has some usability issues. E.g. how do we reset the search?
As an intermediate step we could just hide the searchbar and make it
visible by clicking on the search button.
Diffstat (limited to 'framework/domain/maillistmodel.cpp')
-rw-r--r-- | framework/domain/maillistmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp index 11fb9f82..5a462021 100644 --- a/framework/domain/maillistmodel.cpp +++ b/framework/domain/maillistmodel.cpp | |||
@@ -27,6 +27,7 @@ MailListModel::MailListModel(QObject *parent) | |||
27 | { | 27 | { |
28 | setDynamicSortFilter(true); | 28 | setDynamicSortFilter(true); |
29 | sort(0, Qt::DescendingOrder); | 29 | sort(0, Qt::DescendingOrder); |
30 | setFilterCaseSensitivity(Qt::CaseInsensitive); | ||
30 | } | 31 | } |
31 | 32 | ||
32 | MailListModel::~MailListModel() | 33 | MailListModel::~MailListModel() |
@@ -34,6 +35,16 @@ MailListModel::~MailListModel() | |||
34 | 35 | ||
35 | } | 36 | } |
36 | 37 | ||
38 | void MailListModel::setFilter(const QString &filter) | ||
39 | { | ||
40 | setFilterWildcard(filter); | ||
41 | } | ||
42 | |||
43 | QString MailListModel::filter() const | ||
44 | { | ||
45 | return {}; | ||
46 | } | ||
47 | |||
37 | QHash< int, QByteArray > MailListModel::roleNames() const | 48 | QHash< int, QByteArray > MailListModel::roleNames() const |
38 | { | 49 | { |
39 | QHash<int, QByteArray> roles; | 50 | QHash<int, QByteArray> roles; |