diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-24 22:15:18 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-24 22:15:18 +0100 |
commit | 9ea268a6d0f4054c31b2729ecd6cfcc9d07a2d6a (patch) | |
tree | 41fef7daac9e5ae64d61452a3f38c82243d29fdd /common/query.h | |
parent | 84d70933c0cd0987d5fee5a78f413fec82bb1288 (diff) | |
download | sink-9ea268a6d0f4054c31b2729ecd6cfcc9d07a2d6a.tar.gz sink-9ea268a6d0f4054c31b2729ecd6cfcc9d07a2d6a.zip |
Implemented notification support in the model.
This will allow us to fold things like progress and sync status directly
into the model. Usecases are mail download progress and folder sync
progress.
Ideally we would also solve the resource/account state through this.
Diffstat (limited to 'common/query.h')
-rw-r--r-- | common/query.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/query.h b/common/query.h index 49c8d5e..5b37cdd 100644 --- a/common/query.h +++ b/common/query.h | |||
@@ -300,7 +300,9 @@ public: | |||
300 | /** Leave the query running and continuously update the result set. */ | 300 | /** Leave the query running and continuously update the result set. */ |
301 | LiveQuery = 1, | 301 | LiveQuery = 1, |
302 | /** Run the query synchronously. */ | 302 | /** Run the query synchronously. */ |
303 | SynchronousQuery = 2 | 303 | SynchronousQuery = 2, |
304 | /** Include status updates via notifications */ | ||
305 | UpdateStatus = 4 | ||
304 | }; | 306 | }; |
305 | Q_DECLARE_FLAGS(Flags, Flag) | 307 | Q_DECLARE_FLAGS(Flags, Flag) |
306 | 308 | ||
@@ -410,6 +412,11 @@ public: | |||
410 | mFlags = flags; | 412 | mFlags = flags; |
411 | } | 413 | } |
412 | 414 | ||
415 | Flags flags() const | ||
416 | { | ||
417 | return mFlags; | ||
418 | } | ||
419 | |||
413 | bool liveQuery() const | 420 | bool liveQuery() const |
414 | { | 421 | { |
415 | return mFlags.testFlag(LiveQuery); | 422 | return mFlags.testFlag(LiveQuery); |