diff --git a/src/core/notification/notification_p.h b/src/core/notification/notification_p.h index 5505bc5..06886f7 100644 --- a/src/core/notification/notification_p.h +++ b/src/core/notification/notification_p.h @@ -28,6 +28,7 @@ #include + namespace Snore{ class SNORE_EXPORT NotificationData : public QSharedData diff --git a/src/core/snore.cpp b/src/core/snore.cpp index 68b2b81..96c4637 100644 --- a/src/core/snore.cpp +++ b/src/core/snore.cpp @@ -115,11 +115,6 @@ void SnoreCore::broadcastNotification ( Notification notification ) emit d->notify ( notification ); if ( d->m_notificationBackend != NULL ) { - if(!d->m_notificationBackend->isInitialized()){ - qDebug()<<"Notification backend "<m_notificationBackend<<" isnt initialized will snore will exit now"; - qApp->quit(); - } - d->m_notificationBackend->slotNotify( notification ); d->m_notificationBackend->addActiveNotification(notification); } } @@ -186,8 +181,10 @@ bool SnoreCore::setPrimaryNotificationBackend ( const QString &backend ) if(d->m_notificationBackend) { disconnect(d->m_notificationBackend, SIGNAL(notificationClosed(Snore::Notification))); + disconnect(d, SIGNAL(notify(Snore::Notification)), d->m_notificationBackend, SLOT(slotNotify(Snore::Notification))); } connect(b, SIGNAL(notificationClosed(Snore::Notification)), d, SLOT(slotNotificationClosed(Snore::Notification))); + connect(d, SIGNAL(notify(Snore::Notification)), b, SLOT(slotNotify(Snore::Notification))); } d->m_notificationBackend = b; return true;