From 1b6f1f9fcdb2bde799184c4d879d982d42233cd9 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Sat, 11 Jan 2014 00:19:23 +0100 Subject: [PATCH] fixed disconnect --- src/core/snore.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/snore.cpp b/src/core/snore.cpp index b7b0184..e9b0cdd 100644 --- a/src/core/snore.cpp +++ b/src/core/snore.cpp @@ -209,15 +209,18 @@ bool SnoreCore::setPrimaryNotificationBackend ( const QString &backend ) qDebug()<<"Unknown Backend:"<(PluginContainer::pluginCache()[backend]->load()); if(!b->isInitialized()){ if(!b->init(this)){ - qDebug()<<"Failed to initialize"<name(); + qDebug() << "Failed to initialize" << b->name(); return false; } - disconnect(m_notificationBackend,SIGNAL(closeNotification(Snore::Notification))); - connect(b,SIGNAL(closeNotification(Snore::Notification)),this,SLOT(slotNotificationClosed(Snore::Notification))); + if(m_notificationBackend) + { + disconnect(m_notificationBackend, SIGNAL(closeNotification)); + } + connect(b, SIGNAL(closeNotification), this, SLOT(slotNotificationClosed)); } m_notificationBackend = b; return true;