diff options
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r-- | common/queryrunner.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 73ccf6d..2c50fca 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp | |||
@@ -80,7 +80,11 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
80 | mResourceAccess->open(); | 80 | mResourceAccess->open(); |
81 | QObject::connect(mResourceAccess.data(), &Sink::ResourceAccess::revisionChanged, this, &QueryRunner::revisionChanged); | 81 | QObject::connect(mResourceAccess.data(), &Sink::ResourceAccess::revisionChanged, this, &QueryRunner::revisionChanged); |
82 | // open is not synchronous, so from the time when the initial query is started until we have started and connected to the resource, it's possible to miss updates. We therefore unconditionally try to fetch new entities once we are connected. | 82 | // open is not synchronous, so from the time when the initial query is started until we have started and connected to the resource, it's possible to miss updates. We therefore unconditionally try to fetch new entities once we are connected. |
83 | QObject::connect(mResourceAccess.data(), &Sink::ResourceAccess::ready, this, &QueryRunner::revisionChanged); | 83 | QObject::connect(mResourceAccess.data(), &Sink::ResourceAccess::ready, this, [this] (bool ready) { |
84 | if (ready) { | ||
85 | revisionChanged(); | ||
86 | } | ||
87 | }); | ||
84 | } | 88 | } |
85 | mResultProvider->onDone([this]() { | 89 | mResultProvider->onDone([this]() { |
86 | delete this; | 90 | delete this; |