https://bugs.gentoo.org/941172 https://bugs.kde.org/show_bug.cgi?id=494281 https://bugreports.qt.io/browse/QTBUG-129797 https://codereview.qt-project.org/c/qt/qtdeclarative/+/596457 --- a/src/qmlcompiler/qqmljscodegenerator.cpp +++ b/src/qmlcompiler/qqmljscodegenerator.cpp @@ -78,6 +78,6 @@ return u"QQmlPrivate::compositeListMetaType(aotContext->compilationUnit, "_s + (m_jsUnitGenerator->hasStringId(elementName) - ? QString::number(m_jsUnitGenerator->getStringId(elementName)) - : u'"' + elementName + u'"') + u")"_s; + ? QString::number(m_jsUnitGenerator->getStringId(elementName)) + u')' + : u"QStringLiteral(\"%1\"))"_s.arg(elementName)); } @@ -86,6 +86,6 @@ return u"QQmlPrivate::compositeMetaType(aotContext->compilationUnit, "_s + (m_jsUnitGenerator->hasStringId(elementName) - ? QString::number(m_jsUnitGenerator->getStringId(elementName)) - : u'"' + elementName + u'"') + u")"_s; + ? QString::number(m_jsUnitGenerator->getStringId(elementName)) + u')' + : u"QStringLiteral(\"%1\"))"_s.arg(elementName)); }