From 244c5c3f473eaf3c354a60348ddc668428181b8a Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 19 Nov 2013 22:59:47 +0100 Subject: [PATCH] Fix the Phonon notification backend not playing any sound Phonon won't report its capabilities before a player has been created, which leads to Quassel thinking that it can't play audio since we checked for that before instantiating the player. Some reordering in the ctor fixes this. --- src/qtui/phononnotificationbackend.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qtui/phononnotificationbackend.cpp b/src/qtui/phononnotificationbackend.cpp index 8bd7020d..b4adc1c2 100644 --- a/src/qtui/phononnotificationbackend.cpp +++ b/src/qtui/phononnotificationbackend.cpp @@ -34,13 +34,14 @@ PhononNotificationBackend::PhononNotificationBackend(QObject *parent) : AbstractNotificationBackend(parent), _media(0) { - _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty(); NotificationSettings notificationSettings; - _enabled = notificationSettings.value("Phonon/Enabled", true).toBool(); - createMediaObject(notificationSettings.value("Phonon/AudioFile", QString()).toString()); - notificationSettings.notify("Phonon/Enabled", this, SLOT(enabledChanged(const QVariant &))); notificationSettings.notify("Phonon/AudioFile", this, SLOT(audioFileChanged(const QVariant &))); + + createMediaObject(notificationSettings.value("Phonon/AudioFile", QString()).toString()); + + _enabled = notificationSettings.value("Phonon/Enabled", true).toBool(); + _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty(); } -- 2.20.1