From e001aa78962d7d1078fd73840e278fe4b4c3ee04 Mon Sep 17 00:00:00 2001 From: "G.K.MacGregor" Date: Sun, 20 Aug 2023 22:16:51 +0100 Subject: [PATCH] [Qt6] Use setEncoding instead of deprecated setCodec --- loadsave.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/loadsave.cpp b/loadsave.cpp index 3bfa469..41068bc 100644 --- a/loadsave.cpp +++ b/loadsave.cpp @@ -419,7 +419,11 @@ void saveTTI(QSaveFile &file, const TeletextDocument &document) } }; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) outStream.setCodec("ISO-8859-1"); +#else + outStream.setEncoding(QStringConverter::Latin1); +#endif if (!document.description().isEmpty()) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) @@ -558,7 +562,11 @@ void exportM29File(QSaveFile &file, const TeletextDocument &document) } }; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) outStream.setCodec("ISO-8859-1"); +#else + outStream.setEncoding(QStringConverter::Latin1); +#endif if (!document.description().isEmpty()) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)