X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fphononnotificationbackend.cpp;h=7de23b11e78e5930efe0c1e81fbe2236171aceea;hb=03f61d2ab68356bd74f6f014651c823e79678cbd;hp=b4adc1c25597b077b0957ea4a1949e36989596b0;hpb=244c5c3f473eaf3c354a60348ddc668428181b8a;p=quassel.git diff --git a/src/qtui/phononnotificationbackend.cpp b/src/qtui/phononnotificationbackend.cpp index b4adc1c2..7de23b11 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-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,15 +18,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "phononnotificationbackend.h" + #include +#include #include #include -#include "phononnotificationbackend.h" - #include "clientsettings.h" -#include "iconloader.h" +#include "icon.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(icon::get("media-playback-start")); + ui.play->setIcon(icon::get("media-playback-start")); + ui.open->setIcon(icon::get("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(); } }