diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-05-01 23:51:59 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-05-01 23:51:59 +0200 |
commit | 9c75a6d6715942c1f17f4b0196f3c7a0f0049042 (patch) | |
tree | 6367d6a71f7efd82bbae3e858f55e1b3782e358b | |
parent | ad4d727f198a3088f1c967f6373306d1cb100d72 (diff) | |
download | sink-9c75a6d6715942c1f17f4b0196f3c7a0f0049042.tar.gz sink-9c75a6d6715942c1f17f4b0196f3c7a0f0049042.zip |
Ensure the facade is open when listening to revision changes.
-rw-r--r-- | common/facade.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/facade.h b/common/facade.h index 541d1ce..8c6578f 100644 --- a/common/facade.h +++ b/common/facade.h | |||
@@ -168,6 +168,9 @@ public: | |||
168 | //In case of a live query we keep the runner for as long alive as the result provider exists | 168 | //In case of a live query we keep the runner for as long alive as the result provider exists |
169 | if (query.liveQuery) { | 169 | if (query.liveQuery) { |
170 | resultProvider->setQueryRunner(runner); | 170 | resultProvider->setQueryRunner(runner); |
171 | //Ensure the connection is open, if it wasn't already opened | ||
172 | //TODO If we are not connected already, we have to check for the latest revision once connected, otherwise we could miss some updates | ||
173 | mResourceAccess->open(); | ||
171 | QObject::connect(mResourceAccess.data(), &Akonadi2::ResourceAccess::revisionChanged, runner.data(), &QueryRunner::revisionChanged); | 174 | QObject::connect(mResourceAccess.data(), &Akonadi2::ResourceAccess::revisionChanged, runner.data(), &QueryRunner::revisionChanged); |
172 | } | 175 | } |
173 | 176 | ||