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.
return;
}
- _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(file));
+ _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(QUrl::fromLocalFile(file)));
}
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();
}
}