From c28763d83c493a11da90295ec4bde016c53c0d70 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Thu, 10 Oct 2013 11:56:02 +1000 Subject: update the network configuration list when changes in the networks happen. Task-number: QTBUG-34021 Change-Id: I2bd187e7d04d6876294f18d917c9a384afe5db35 Reviewed-by: Robin Burchell --- src/plugins/bearer/connman/qconnmanservice_linux.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/plugins/bearer/connman/qconnmanservice_linux.cpp') diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index 380cf92a24..6d9ee265c6 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -127,8 +127,24 @@ void QConnmanManagerInterface::connectNotify(const QMetaMethod &signal) QObject::connect(helper,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), this,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), Qt::UniqueConnection); } + static const QMetaMethod servicesChangedSignal = QMetaMethod::fromSignal(&QConnmanManagerInterface::servicesChanged); + if (signal == servicesChangedSignal) { + if (!connection().connect(QLatin1String(CONNMAN_SERVICE), + QLatin1String(CONNMAN_MANAGER_PATH), + QLatin1String(CONNMAN_MANAGER_INTERFACE), + QLatin1String("ServicesChanged"), + this,SLOT(onServicesChanged(ConnmanMapList, QList)))) { + qWarning() << "servicesChanged not connected"; + } + } } +void QConnmanManagerInterface::onServicesChanged(const ConnmanMapList &changed, const QList &removed) +{ + emit servicesChanged(changed, removed); +} + + void QConnmanManagerInterface::disconnectNotify(const QMetaMethod &signal) { static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanManagerInterface::propertyChanged); -- cgit v1.2.3