diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-24 17:10:33 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-24 17:10:33 +0100 |
commit | 38f05ed5552329fe79743ed4caace8313442d3ed (patch) | |
tree | 983610863fcf03b39198332c95aa1ce5d8f03230 /framework/domain/maillistmodel.h | |
parent | dec32c8e1fc2ee6eece1330300f6690389a0898d (diff) | |
download | kube-38f05ed5552329fe79743ed4caace8313442d3ed.tar.gz kube-38f05ed5552329fe79743ed4caace8313442d3ed.zip |
Compress synchronization requests
Diffstat (limited to 'framework/domain/maillistmodel.h')
-rw-r--r-- | framework/domain/maillistmodel.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/domain/maillistmodel.h b/framework/domain/maillistmodel.h index af079a1b..1fd0ef5e 100644 --- a/framework/domain/maillistmodel.h +++ b/framework/domain/maillistmodel.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <QSortFilterProxyModel> | 25 | #include <QSortFilterProxyModel> |
26 | #include <QSharedPointer> | 26 | #include <QSharedPointer> |
27 | #include <QStringList> | 27 | #include <QStringList> |
28 | #include <QTimer> | ||
28 | 29 | ||
29 | class MailListModel : public QSortFilterProxyModel | 30 | class MailListModel : public QSortFilterProxyModel |
30 | { | 31 | { |
@@ -69,11 +70,16 @@ public: | |||
69 | void setMail(const QVariant &mail); | 70 | void setMail(const QVariant &mail); |
70 | QVariant mail() const; | 71 | QVariant mail() const; |
71 | 72 | ||
73 | private slots: | ||
74 | void fetch(); | ||
75 | |||
72 | private: | 76 | private: |
73 | void fetchMail(Sink::ApplicationDomain::Mail::Ptr mail) const; | 77 | void fetchMail(Sink::ApplicationDomain::Mail::Ptr mail); |
74 | 78 | ||
75 | QSharedPointer<QAbstractItemModel> m_model; | 79 | QSharedPointer<QAbstractItemModel> m_model; |
76 | bool mFetchMails = false; | 80 | bool mFetchMails = false; |
77 | mutable QSet<QByteArray> mFetchedMails; | 81 | QSet<QByteArray> mFetchedMails; |
82 | QList<Sink::ApplicationDomain::Mail> mMailsToFetch; | ||
78 | QByteArray mCurrentQueryItem; | 83 | QByteArray mCurrentQueryItem; |
84 | QTimer mFetchTimer; | ||
79 | }; | 85 | }; |