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>
This commit is contained in:
parent
f96a19d1b4
commit
27b953efae
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user