From: Manuel Nickschas Date: Tue, 19 Nov 2013 22:01:16 +0000 (+0100) Subject: Avoid Phonon's deprecation warnings X-Git-Tag: 0.10-beta1~99 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=307cafe026abea9badd8400b8fd594738f0160fe Avoid Phonon's deprecation warnings MediaSource prefers a QUrl now. This shouldn't break with older Phonon versions, I hope, since it seems MediaSource(QUrl) has been around since forever. --- diff --git a/src/qtui/phononnotificationbackend.cpp b/src/qtui/phononnotificationbackend.cpp index b4adc1c2..b7317d25 100644 --- a/src/qtui/phononnotificationbackend.cpp +++ b/src/qtui/phononnotificationbackend.cpp @@ -99,7 +99,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))); } @@ -200,7 +200,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(); } }