mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-03 10:57:33 +01:00
Only use QTextStream::setCodec() with Qt < 6
This commit is contained in:
parent
3927b3bf27
commit
aeb32783d6
@ -61,7 +61,9 @@ void ScrobblerCache::ReadCache() {
|
||||
if (!result) return;
|
||||
|
||||
QTextStream stream(&file);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
stream.setCodec("UTF-8");
|
||||
#endif
|
||||
QString data = stream.readAll();
|
||||
file.close();
|
||||
|
||||
@ -179,7 +181,9 @@ void ScrobblerCache::WriteCache() {
|
||||
return;
|
||||
}
|
||||
QTextStream stream(&file);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
stream.setCodec("UTF-8");
|
||||
#endif
|
||||
stream << doc.toJson();
|
||||
file.close();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user