make sure the fallback works

This commit is contained in:
Patrick von Reth 2015-07-15 12:35:59 +02:00
parent 9f3cdc6f41
commit f67d4a5201
1 changed files with 4 additions and 4 deletions

View File

@ -93,15 +93,15 @@ bool SnoreCorePrivate::setBackendIfAvailible(const QString &backend)
if (m_notificationBackend) { if (m_notificationBackend) {
m_notificationBackend->disable(); m_notificationBackend->disable();
} }
m_notificationBackend = b;
m_notificationBackend->enable();
q->setSettingsValue(QLatin1String("PrimaryBackend"), backend, LOCAL_SETTING);
connect(b, &SnoreBackend::loadedStateChanged, [this, b](bool initialized) { connect(b, &SnoreBackend::loadedStateChanged, [this, b](bool initialized) {
if (!initialized) { if (!initialized) {
slotInitPrimaryNotificationBackend(); slotInitPrimaryNotificationBackend();
} }
}); });
m_notificationBackend = b;
m_notificationBackend->enable();
q->setSettingsValue(QLatin1String("PrimaryBackend"), backend, LOCAL_SETTING);
return true; return true;
} }
return false; return false;