summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-07-25 20:28:05 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-16 12:14:02 +0200
commit7c9a7ed406e1e7e079759b0048280a05e453eb10 (patch)
tree8b343e88c440cd03bab8cf51077a0cb4f4e2e742 /rbutil/rbutilqt/base
parent9cd37337dec6c970a1fd148e92ffc43fbf409cc3 (diff)
downloadrockbox-7c9a7ed406e1e7e079759b0048280a05e453eb10.tar.gz
rockbox-7c9a7ed406e1e7e079759b0048280a05e453eb10.zip
rbutil: Initial Qt6 support.
Qt6 replaces QTextStream::setCodec() with QTextStream::setEncoding(). Change-Id: I4cfa90d89f54ad49d061ad859585a2a74b5f9786
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp4
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index 320ee1191a..d2d8cf801a 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -143,7 +143,11 @@ bool TTSSapi::start(QString *errStr)
}
voicestream = new QTextStream(voicescript);
+#if QT_VERSION < 0x060000
voicestream->setCodec("UTF16-LE");
+#else
+ voicestream->setEncoding(QStringConverter::Utf16LE);
+#endif
m_started = true;
return true;
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index 814ac538e2..ec9ecbed33 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -217,7 +217,11 @@ void VoiceFileCreator::create(void)
//read in downloaded file
emit logItem(tr("Reading strings..."),LOGINFO);
QTextStream in(&genlang);
+#if QT_VERSION < 0x060000
in.setCodec("UTF-8");
+#else
+ in.setEncoding(QStringConverter::Utf8);
+#endif
QString id, voice;
bool idfound = false;
bool voicefound=false;