summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/connman
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@jollamobile.com>2013-05-16 04:42:39 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-08 08:27:09 +0200
commit275c4b8403ddbdcd126cd55dfcc37bd1f5b6d9f7 (patch)
tree7997c39075e05664d2cf2b567eb254748874c9a5 /src/plugins/bearer/connman
parent4d93393a6de2d6631979df2bc6d12aa43781dc6f (diff)
code cleanup. make one way to access system dbus. remove dead uncommented code
Change-Id: Ia53cdc27f354269bb393ac137802b8807652cef9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/bearer/connman')
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp34
1 files changed, 7 insertions, 27 deletions
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<QVariantMap> 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()
{
}