UI: Don't use QTextStream::setCodec in Qt6
In Qt6, QTextStream::setCodec has been replaced by QTextStream::setEncoding. However, all text is assumed to be UTF-8, so we don't need to specify UTF-8 in Qt6. https://doc.qt.io/qt-5/qtextstream.html#setCodec-1 https://doc.qt.io/qt-6/qtextstream.html#setEncodingmaster
parent
05d29aa4e3
commit
e81f8e3857
|
@ -101,9 +101,7 @@ void OBSLogViewer::InitLog()
|
|||
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
QTextStream in(&file);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
in.setEncoding(QStringConverter::Utf8);
|
||||
#else
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
in.setCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue