[multimedia/haruna] src/playlist: m3uparser: use create QString from std::filesystem::path::generic_u16string
George Florea Bănuș <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 2f251b9f920f5417a1682f50053a63228e56eb19 by George Florea Bănuș.
Committed on 19/07/2026 at 01:16.
Pushed by georgefb into branch 'master'.
m3uparser: use create QString from std::filesystem::path::generic_u16string
M +5 -5 src/playlist/m3uparser.cpp
https://invent.kde.org/multimedia/haruna/-/commit/2f251b9f920f5417a1682f50053a63228e56eb19
diff --git a/src/playlist/m3uparser.cpp b/src/playlist/m3uparser.cpp
index 099fa840..5a1c8579 100644
--- a/src/playlist/m3uparser.cpp
+++ b/src/playlist/m3uparser.cpp
@@ -20,7 +20,7 @@ void M3uParser::read(const std::filesystem::path &path)
{
QFile file(path);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
- qDebug() << "Couldn't open file:" << path.u16string() << file.errorString();
+ qDebug() << "Couldn't open file:" << path.generic_u16string() << file.errorString();
return;
}
@@ -33,12 +33,12 @@ void M3uParser::read(const std::filesystem::path &path)
auto firstLine = in.readLine();
if (firstLine.startsWith(u"#EXTM3U")) {
while (!in.atEnd()) {
- parseExtendedLine(in.readLine(), QString::fromStdString(path));
+ parseExtendedLine(in.readLine(), QString(path.generic_u16string()));
}
} else {
- parseStandardLine(firstLine, QString::fromStdString(path));
+ parseStandardLine(firstLine, QString(path.generic_u16string()));
while (!in.atEnd()) {
- parseStandardLine(in.readLine(), QString::fromStdString(path));
+ parseStandardLine(in.readLine(), QString(path.generic_u16string()));
}
}
file.close();
@@ -147,7 +147,7 @@ QUrl M3uParser::stringToUrl(const QString &urlString, const QString &parentPath)
path = playlistParentPath.parent_path() / path;
}
- return QUrl::fromLocalFile(QString::fromStdString(path));
+ return QUrl::fromLocalFile(QString(path.generic_u16string()));
}
QList<MetaData> M3uParser::data() const