Skip to content

Commit dc2f46a

Browse files
committed
Dump translated help of the settings to file
Correcting codec problems for QT 6 ("taken" from adapter.h)
1 parent c39c995 commit dc2f46a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

addon/doxywizard/expert.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
#include <QFileInfo>
3838
#include <QRegularExpression>
3939
#include <QDebug>
40+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
41+
#include <QStringConverter>
42+
#endif
4043

4144
#define SA(x) QString::fromLatin1(x)
4245

@@ -1173,7 +1176,11 @@ void Expert::dump()
11731176
if (fileOut.open(QFile::WriteOnly|QFile::Text))
11741177
{
11751178
QTextStream out(&fileOut);
1176-
out.setCodec("UTF-8");
1179+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1180+
out.setCodec(QTextCodec::codecForName("UTF-8"));
1181+
#else
1182+
out.setEncoding(QStringConverter::Utf8);
1183+
#endif
11771184
QHashIterator<QString, Input*> i(m_options);
11781185
std::vector<QString> v;
11791186
while (i.hasNext())

0 commit comments

Comments
 (0)