From 164150a14ff497c6962318c7bc17e164c046082f Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Wed, 13 Aug 2014 22:10:51 +0200 Subject: Recreate org.nemomobile.voicecall.VoiceCallManager QDBusInterface every initialize() attempt Fixes #9 --- daemon/voicecallmanager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'daemon/voicecallmanager.cpp') diff --git a/daemon/voicecallmanager.cpp b/daemon/voicecallmanager.cpp index 419ecff..ac03b51 100644 --- a/daemon/voicecallmanager.cpp +++ b/daemon/voicecallmanager.cpp @@ -32,13 +32,6 @@ public: VoiceCallManager::VoiceCallManager(Settings *settings, QObject *parent) : QObject(parent), d_ptr(new VoiceCallManagerPrivate(this)), settings(settings) { - Q_D(VoiceCallManager); - d->interface = new QDBusInterface("org.nemomobile.voicecall", - "/", - "org.nemomobile.voicecall.VoiceCallManager", - QDBusConnection::sessionBus(), - this); - this->initialize(); } @@ -53,6 +46,13 @@ void VoiceCallManager::initialize(bool notifyError) Q_D(VoiceCallManager); bool success = false; + delete d->interface; + d->interface = new QDBusInterface("org.nemomobile.voicecall", + "/", + "org.nemomobile.voicecall.VoiceCallManager", + QDBusConnection::sessionBus(), + this); + if(d->interface->isValid()) { success = true; -- cgit v1.2.3