From f67d4a5201b7f26ce9d6a5283f36b93113df7342 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Wed, 15 Jul 2015 12:35:59 +0200 Subject: [PATCH] make sure the fallback works --- src/libsnore/snore_p.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsnore/snore_p.cpp b/src/libsnore/snore_p.cpp index 16abb09..96b56eb 100644 --- a/src/libsnore/snore_p.cpp +++ b/src/libsnore/snore_p.cpp @@ -93,15 +93,15 @@ bool SnoreCorePrivate::setBackendIfAvailible(const QString &backend) if (m_notificationBackend) { m_notificationBackend->disable(); } + m_notificationBackend = b; + m_notificationBackend->enable(); + q->setSettingsValue(QLatin1String("PrimaryBackend"), backend, LOCAL_SETTING); + connect(b, &SnoreBackend::loadedStateChanged, [this, b](bool initialized) { if (!initialized) { slotInitPrimaryNotificationBackend(); } }); - - m_notificationBackend = b; - m_notificationBackend->enable(); - q->setSettingsValue(QLatin1String("PrimaryBackend"), backend, LOCAL_SETTING); return true; } return false;