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…
Reference in New Issue