From 96d9cf8de40804690b98d06daf15f2067b527d32 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 30 Apr 2021 11:31:33 +0200 Subject: uic: Fix font family code generation for python Amend the code introduced by d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 to generator correct code for Python. Change-Id: I71fc9a1830d6bd591d32ce08002572c29f02a27f Reviewed-by: Jani Heikkinen Reviewed-by: Jarek Kobus (cherry picked from commit b2ebc64dd9914359fe8acf2bc9960e341e98cf80) Reviewed-by: Qt Cherry-pick Bot --- src/tools/uic/cpp/cppwriteinitialization.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp') diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 534a78791d3..9471fd22d93 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -1624,8 +1624,10 @@ QString WriteInitialization::writeFontProperties(const DomFont *f) m_output << m_indent << language::stackVariable("QFont", fontName) << language::eol; if (f->hasElementFamily() && !f->elementFamily().isEmpty()) { - m_output << m_indent << fontName << ".setFamilies(QStringList{" - << language::qstring(f->elementFamily(), m_dindent) << "})" << language::eol; + m_output << m_indent << fontName << ".setFamilies(" + << language::listStart + << language::qstring(f->elementFamily(), m_dindent) + << language::listEnd << ')' << language::eol; } if (f->hasElementPointSize() && f->elementPointSize() > 0) { m_output << m_indent << fontName << ".setPointSize(" << f->elementPointSize() -- cgit v1.2.3