From 2d1bc24d6b6b032dc7db5a2ef7e63bcef43fd511 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 5 Oct 2023 17:50:54 +0200 Subject: Changes that will need to be reworked. QFont changed the weight scale in Qt6, in order to use them we'd need to fix all configuration files in all themes. QStreamConverter only supports Utf8/16/32 and Latin1 before Qt6.5. Stick to qt5compat's QTextCodec by now --- src/modules/help/HelpIndex.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/modules/help') diff --git a/src/modules/help/HelpIndex.cpp b/src/modules/help/HelpIndex.cpp index 4ce07616f..33c42781a 100644 --- a/src/modules/help/HelpIndex.cpp +++ b/src/modules/help/HelpIndex.cpp @@ -44,7 +44,11 @@ #include #include #include +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) #include +#else +#include +#endif #include #include #include @@ -200,7 +204,11 @@ void HelpIndex::parseDocument(const QString & filename, int docNum) } QTextStream s(&file); - s.setCodec(QTextCodec::codecForMib(106)); +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + s.setCodec(QTextCodec::codecForMib(106)); +#else + s.setEncoding(QStringConverter::Utf8); +#endif QString text = s.readAll(); if(text.isNull()) return; -- cgit v1.3.1-10-gc9f91