From 307cafe026abea9badd8400b8fd594738f0160fe Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 19 Nov 2013 23:01:16 +0100 Subject: [PATCH] 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. --- src/qtui/phononnotificationbackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } } -- 2.20.1