X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fphononnotificationbackend.cpp;h=6710c92b5287aefef11f5331ab3a6ab69c4c7780;hb=04ef61a441889963e5e730c0e7ee0b3b34f661cd;hp=b4adc1c25597b077b0957ea4a1949e36989596b0;hpb=244c5c3f473eaf3c354a60348ddc668428181b8a;p=quassel.git diff --git a/src/qtui/phononnotificationbackend.cpp b/src/qtui/phononnotificationbackend.cpp index b4adc1c2..6710c92b 100644 --- a/src/qtui/phononnotificationbackend.cpp +++ b/src/qtui/phononnotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -19,6 +19,8 @@ ***************************************************************************/ #include +#include +#include #include #include @@ -26,7 +28,6 @@ #include "phononnotificationbackend.h" #include "clientsettings.h" -#include "iconloader.h" #include "mainwin.h" #include "qtui.h" @@ -99,7 +100,7 @@ void PhononNotificationBackend::createMediaObject(const QString &file) return; } - _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(file)); + _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(QUrl::fromLocalFile(file))); } @@ -111,9 +112,9 @@ PhononNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) { ui.setupUi(this); _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty(); - ui.enabled->setIcon(SmallIcon("media-playback-start")); - ui.play->setIcon(SmallIcon("media-playback-start")); - ui.open->setIcon(SmallIcon("document-open")); + ui.enabled->setIcon(QIcon::fromTheme("media-playback-start")); + ui.play->setIcon(QIcon::fromTheme("media-playback-start")); + ui.open->setIcon(QIcon::fromTheme("document-open")); connect(ui.enabled, SIGNAL(toggled(bool)), SLOT(widgetChanged())); connect(ui.filename, SIGNAL(textChanged(const QString &)), SLOT(widgetChanged())); @@ -200,7 +201,7 @@ void PhononNotificationBackend::ConfigWidget::on_play_clicked() if (audioPreview) delete audioPreview; - audioPreview = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(ui.filename->text())); + audioPreview = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(QUrl::fromLocalFile(ui.filename->text()))); audioPreview->play(); } }