summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2011-07-07 17:02:42 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-07 17:37:29 +0200
commit27b953efae3bbd02509d7d9d5c514cadf0e51d85 (patch)
treefa90e384ce771fe16455bb88fff4a8360804c7dd /src
parentf96a19d1b474292940dab3a20194a88395aca8ed (diff)
Don't keep a static instance of QDBusConnection
Prevents weird crashes at app exit and makes backtraces from potential crashes saner because they won't start in __cxa_init. Change-Id: I62821faad03b06ec92da05d96027b668d1f1ca0f Reviewed-on: http://codereview.qt.nokia.com/1324 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp
index 7c0a255c17..d862456ddc 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux.cpp
+++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp
@@ -57,8 +57,6 @@
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
-static QDBusConnection dbusConnection = QDBusConnection::systemBus();
-
QOfonoManagerInterface::QOfonoManagerInterface( QObject *parent)
: QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
@@ -106,7 +104,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
QLatin1String(OFONO_MANAGER_PATH),
QLatin1String(OFONO_MANAGER_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -256,7 +254,7 @@ void QOfonoModemInterface::connectNotify(const char *signal)
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_MODEM_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -379,7 +377,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_NETWORK_REGISTRATION_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -477,7 +475,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_NETWORK_OPERATOR_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -580,7 +578,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_SIM_MANAGER_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -669,7 +667,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_DATA_CONNECTION_MANAGER_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -788,7 +786,7 @@ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_DATA_CONTEXT_INTERFACE),
QLatin1String("PropertyChanged"),
@@ -870,7 +868,7 @@ void QOfonoSmsInterface::connectNotify(const char *signal)
QOfonoDBusHelper *helper;
helper = new QOfonoDBusHelper(this);
- dbusConnection.connect(QLatin1String(OFONO_SERVICE),
+ QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
this->path(),
QLatin1String(OFONO_SMS_MANAGER_INTERFACE),
QLatin1String("PropertyChanged"),