changes to plugin initialisation

This commit is contained in:
Patrick von Reth 2014-01-19 19:13:39 +01:00
parent b4b73a8f36
commit bbae4fc5a6
1 changed files with 6 additions and 6 deletions

View File

@ -168,7 +168,7 @@ bool SnoreCore::setPrimaryNotificationBackend ( const QString &backend )
if(!PluginContainer::pluginCache().contains(backend))
{
qDebug() << "Unknown Backend:" << backend;
return setPrimaryNotificationBackend();
return false;
}
qDebug() << "Setting Notification Backend to:" << backend;
SnoreBackend* b = qobject_cast<SnoreBackend*>(PluginContainer::pluginCache()[backend]->load());
@ -211,7 +211,7 @@ bool SnoreCore::setPrimaryNotificationBackend()
#elif defined(Q_OS_LINUX)
if( backends.contains("FreedesktopNotification_Backend"))
{
return setPrimaryNotificationBackend("FreedesktopNotification_Backend");
return setPrimaryNotificationBackend("FreedesktopNotification");
}
#elif defined(Q_OS_MAC)
if( backends.contains("Growl"))
@ -244,9 +244,9 @@ QSystemTrayIcon *SnoreCore::trayIcon(){
Notification SnoreCore::getActiveNotificationByID(uint id)
{
Q_D(SnoreCore);
if(!d->m_notificationBackend->isInitialized()){
qDebug() << "Notification backend " << d->m_notificationBackend << " isn't initialized will snore will exit now";
qApp->quit();
if(!d->m_notificationBackend->isInitialized())
{
qFatal("Notification backend %s isn't initialized will snore will exit now",d->m_notificationBackend->name().toLatin1().constData());
}
return d->m_notificationBackend->getActiveNotificationByID(id);
}