From 275c4b8403ddbdcd126cd55dfcc37bd1f5b6d9f7 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Thu, 16 May 2013 04:42:39 +1000 Subject: code cleanup. make one way to access system dbus. remove dead uncommented code Change-Id: Ia53cdc27f354269bb393ac137802b8807652cef9 Reviewed-by: Thiago Macieira --- .../bearer/connman/qconnmanservice_linux.cpp | 34 +++++----------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index 4efecc5464..380cf92a24 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -74,7 +74,6 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanMap &map) return argument; } -static QDBusConnection dbusConnection = QDBusConnection::systemBus(); QConnmanManagerInterface::QConnmanManagerInterface( QObject *parent) : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), QLatin1String(CONNMAN_MANAGER_PATH), @@ -98,7 +97,7 @@ void QConnmanManagerInterface::connectNotify(const QMetaMethod &signal) QLatin1String(CONNMAN_MANAGER_INTERFACE), QLatin1String("PropertyChanged"), this,SIGNAL(propertyChanged(QString,QDBusVariant)))) { - qWarning() << "PropertyCHanged not connected"; + qWarning() << "PropertyChanged not connected"; } } @@ -118,7 +117,7 @@ void QConnmanManagerInterface::connectNotify(const QMetaMethod &signal) QConnmanDBusHelper *helper; helper = new QConnmanDBusHelper(this); - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), QLatin1String(CONNMAN_MANAGER_PATH), QLatin1String(CONNMAN_MANAGER_INTERFACE), QLatin1String("PropertyChanged"), @@ -379,7 +378,7 @@ void QConnmanProfileInterface::connectNotify(const QMetaMethod &signal) { static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanProfileInterface::propertyChanged); if (signal == propertyChangedSignal) { - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), this->path(), QLatin1String(CONNMAN_PROFILE_INTERFACE), QLatin1String("PropertyChanged"), @@ -449,7 +448,7 @@ void QConnmanServiceInterface::connectNotify(const QMetaMethod &signal) { static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanServiceInterface::propertyChanged); if (signal == propertyChangedSignal) { - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), this->path(), QLatin1String(CONNMAN_SERVICE_INTERFACE), QLatin1String("PropertyChanged"), @@ -460,7 +459,7 @@ void QConnmanServiceInterface::connectNotify(const QMetaMethod &signal) QConnmanDBusHelper *helper; helper = new QConnmanDBusHelper(this); - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), this->path(), QLatin1String(CONNMAN_SERVICE_INTERFACE), QLatin1String("PropertyChanged"), @@ -514,9 +513,6 @@ void QConnmanServiceInterface::remove() QDBusReply reply = this->call(QLatin1String("Remove")); } -// void moveBefore(QDBusObjectPath &service); -// void moveAfter(QDBusObjectPath &service); - // properties QString QConnmanServiceInterface::getState() { @@ -779,7 +775,7 @@ void QConnmanTechnologyInterface::connectNotify(const QMetaMethod &signal) { static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanTechnologyInterface::propertyChanged); if (signal == propertyChangedSignal) { - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), this->path(), QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE), QLatin1String("PropertyChanged"), @@ -790,7 +786,7 @@ void QConnmanTechnologyInterface::connectNotify(const QMetaMethod &signal) QConnmanDBusHelper *helper; helper = new QConnmanDBusHelper(this); - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(CONNMAN_SERVICE), this->path(), QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE), QLatin1String("PropertyChanged"), @@ -861,23 +857,11 @@ QConnmanAgentInterface::~QConnmanAgentInterface() void QConnmanAgentInterface::connectNotify(const QMetaMethod &signal) { Q_UNUSED(signal); -// static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanAgentInterface::propertyChanged); -// if (signal == propertyChangedSignal) { -// dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), -// this->path(), -// QLatin1String(CONNMAN_NETWORK_INTERFACE), -// QLatin1String("PropertyChanged"), -// this,SIGNAL(propertyChanged(QString,QVariant&))); -// } } void QConnmanAgentInterface::disconnectNotify(const QMetaMethod &signal) { Q_UNUSED(signal); -// static const QMetaMethod propertyChangedSignal = QMetaMethod::fromSignal(&QConnmanAgentInterface::propertyChanged); -// if (signal == propertyChangedSignal) { - -// } } @@ -889,10 +873,6 @@ void QConnmanAgentInterface::reportError(QDBusObjectPath &/*path*/, const QStrin { } -//dict QConnmanAgentInterface::requestInput(QDBusObjectPath &path, dict fields) -//{ -//} - void QConnmanAgentInterface::cancel() { } -- cgit v1.2.3