diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-08-07 13:53:05 -0700 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-08 11:48:10 +0200 |
commit | 883dfb3d156431eeb3ffc8f02a09c89bb7fa7d46 (patch) | |
tree | d4c2b3d096e1d5c64be698b5d0cd8c8bae35b2b4 /src/dbus | |
parent | 5a9b1425e187bc77122354cf7446bcf6bb322ff4 (diff) | |
parent | b75bc0f75c09b192dba68449b009cdf175519dbd (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/widgets/kernel/qwidget.cpp
This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56ab37f9a9d5b9c34543126adb89e2b08) after the recent addition of
the flowId attribute to the teamcity output (commit
8f036562119dd35ce51dc9230304d893b906bd37 in 5.9).
Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
Diffstat (limited to 'src/dbus')
-rw-r--r-- | src/dbus/qdbusabstractinterface.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp index c90173db76..9f2e688ebb 100644 --- a/src/dbus/qdbusabstractinterface.cpp +++ b/src/dbus/qdbusabstractinterface.cpp @@ -121,11 +121,6 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv if (!connection.isConnected()) { lastError = QDBusError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage()); - } else if (!service.isEmpty()) { - currentOwner = connectionPrivate()->getNameOwner(service); // verify the name owner - if (currentOwner.isEmpty()) { - lastError = connectionPrivate()->lastError; - } } } @@ -133,9 +128,14 @@ void QDBusAbstractInterfacePrivate::initOwnerTracking() { if (!isValid || !connection.isConnected() || !connectionPrivate()->shouldWatchService(service)) return; + QObject::connect(new QDBusServiceWatcher(service, connection, QDBusServiceWatcher::WatchForOwnerChange, q_func()), SIGNAL(serviceOwnerChanged(QString,QString,QString)), q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString))); + + currentOwner = connectionPrivate()->getNameOwner(service); + if (currentOwner.isEmpty()) + lastError = connectionPrivate()->lastError; } bool QDBusAbstractInterfacePrivate::canMakeCalls() const |