From 629fa121be72e8a454dea8aceb252fab1f795187 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 12 Sep 2016 20:34:31 +0200 Subject: [PATCH] [MPRIS Dataengine] Use UTF-8 for URLs instead of Latin1 While investingating properties of the MPRIS dataengine, I have noitced that the :xsesam:url property in the metadata was encoded incorrectly. I have several folders containing music with non-Latin characters, and they showed up as ????. After a quick chat with kbroulik on IRC, I decided to make this patch, which uses UTF-8 instead. Differential Revision: https://phabricator.kde.org/D2732 --- dataengines/mpris2/playercontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataengines/mpris2/playercontainer.cpp b/dataengines/mpris2/playercontainer.cpp index cbb009901..fc1b6e322 100644 --- a/dataengines/mpris2/playercontainer.cpp +++ b/dataengines/mpris2/playercontainer.cpp @@ -156,7 +156,7 @@ void PlayerContainer::refresh() static bool decodeUri(QVariantMap &map, const QString& entry) { if (map.contains(entry)) { QString urlString = map.value(entry).toString(); - QUrl url = QUrl::fromEncoded(urlString.toLatin1()); + QUrl url = QUrl::fromEncoded(urlString.toUtf8()); if (!url.isValid()) { // try to be lenient url = QUrl(urlString);