From 752e9a066cab132f7c871b37b4334e450a056d2d Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Tue, 22 Jan 2019 13:11:24 +0100 Subject: Fix ApplicationInterfaceExtension signal emission The ready- and objectChanged signal would not arrive in QML code, because they are sent before the connection is established. Sending the signal in the componentComplete function now. Change-Id: Ie6717afc12e8103fb62ff9a5739e7d6c7339d5d4 Reviewed-by: Robert Griebl --- src/manager-lib/qmlinprocessapplicationinterface.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/manager-lib/qmlinprocessapplicationinterface.cpp b/src/manager-lib/qmlinprocessapplicationinterface.cpp index 59ec0523..a24651b4 100644 --- a/src/manager-lib/qmlinprocessapplicationinterface.cpp +++ b/src/manager-lib/qmlinprocessapplicationinterface.cpp @@ -238,8 +238,8 @@ uint QmlInProcessNotification::libnotifyShow() \readonly This property will change to \c true, as soon as the connection to the remote interface has - succeeded. In single-process setups, this will always be \c true, whereas in multi-process - setups, it takes a few milli-seconds to setup the D-Bus connection first. + succeeded. In multi-process setups, it takes a few milli-seconds to establish the D-Bus + connection. */ /*! @@ -283,6 +283,11 @@ void QmlInProcessApplicationInterfaceExtension::componentComplete() connect(ApplicationIPCManager::instance(), &ApplicationIPCManager::interfaceCreated, this, &QmlInProcessApplicationInterfaceExtension::resolveObject); + + if (isReady()) { + emit objectChanged(); + emit readyChanged(); + } } void QmlInProcessApplicationInterfaceExtension::resolveObject() -- cgit v1.2.3