diff options
author | Lorn Potter <lorn.potter@jollamobile.com> | 2013-10-10 11:56:02 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-11 03:30:44 +0100 |
commit | c28763d83c493a11da90295ec4bde016c53c0d70 (patch) | |
tree | fad7108a993726ef08060f6cf3208e6d7a5f7352 /src/plugins/bearer/connman/qconnmanservice_linux.cpp | |
parent | 67cf8bf9a8e6e583e9da02b153e8fdbe558637cb (diff) |
update the network configuration list
when changes in the networks happen.
Task-number: QTBUG-34021
Change-Id: I2bd187e7d04d6876294f18d917c9a384afe5db35
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/bearer/connman/qconnmanservice_linux.cpp')
-rw-r--r-- | src/plugins/bearer/connman/qconnmanservice_linux.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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<QDBusObjectPath>)))) { + qWarning() << "servicesChanged not connected"; + } + } } +void QConnmanManagerInterface::onServicesChanged(const ConnmanMapList &changed, const QList<QDBusObjectPath> &removed) +{ + emit servicesChanged(changed, removed); +} + + void QConnmanManagerInterface::disconnectNotify(const QMetaMethod &signal) { static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanManagerInterface::propertyChanged); |