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.
: AbstractNotificationBackend(parent),
_media(0)
{
: AbstractNotificationBackend(parent),
_media(0)
{
- _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty();
NotificationSettings notificationSettings;
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 &)));
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();