fixed disconnect

This commit is contained in:
Patrick von Reth 2014-01-11 00:19:23 +01:00
parent f19a561799
commit 1b6f1f9fcd
1 changed files with 7 additions and 4 deletions

View File

@ -216,8 +216,11 @@ bool SnoreCore::setPrimaryNotificationBackend ( const QString &backend )
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;