Use the new QDBusConnectionPrivate::shouldWatchService function
That function was added in the previous commit, so deduplicate the code from QDBusAbstractInterfacePrivate::initOwnerTracking(). Change-Id: Iee8cbc07c4434ce9b560ffff13d06f1d9fb0cde5 Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>bb10
parent
f744aece9d
commit
d8148edb23
|
|
@ -101,9 +101,7 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv
|
|||
|
||||
void QDBusAbstractInterfacePrivate::initOwnerTracking()
|
||||
{
|
||||
if (!isValid || !connection.isConnected() || connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode)
|
||||
return;
|
||||
if (service.isEmpty() || service.startsWith(QLatin1Char(':')))
|
||||
if (!isValid || !connection.isConnected() || !connectionPrivate()->shouldWatchService(service))
|
||||
return;
|
||||
QObject::connect(new QDBusServiceWatcher(service, connection, QDBusServiceWatcher::WatchForOwnerChange, q_func()),
|
||||
SIGNAL(serviceOwnerChanged(QString,QString,QString)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue