From 09fba6f07c87aec84c80ce65136f0b7333b0b0bd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 5 Jul 2017 23:40:34 +0200 Subject: Keep notifier alive for notifications of new resources. Necessary to get notifications for newly created resources. --- common/notifier.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/notifier.cpp b/common/notifier.cpp index 1af65e9..1b7cbdb 100644 --- a/common/notifier.cpp +++ b/common/notifier.cpp @@ -49,6 +49,7 @@ public: QList> resourceAccess; QList> handler; + QSharedPointer > > mResourceEmitter; QObject context; }; @@ -91,6 +92,9 @@ Notifier::Notifier(const Sink::Query &resourceQuery) : d(new Sink::Notifier::Pri SinkTraceCtx(resourceCtx) << "Resource query complete"; }); emitter->fetch({}); + if (resourceQuery.liveQuery()) { + d->mResourceEmitter = emitter; + } result.first.exec(); } -- cgit v1.2.3