Fix toqstr(chart_type) with Qt6 (#12252)

This commit is contained in:
Juergen Spitzmueller 2021-04-17 15:10:26 +02:00
parent 0acf594df2
commit 511ba894ff

View File

@ -57,7 +57,7 @@ QString toqstr(docstring const & ucs4)
QString toqstr(char_type ucs4)
{
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
return QString::fromStdU32String(std::u32string(ucs4, 1));
return QString::fromStdU32String(std::u32string(1, ucs4));
#else
union { char_type c; uint i; } u = { ucs4 };
return QString::fromUcs4(&u.i, 1);