moc: align and use newlines in the generated staticMetaObjects
Change-Id: Id59bdd8f1a804b809e22fffd154078f047078d70 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
16794e98bc
commit
d6e9076891
@ -523,29 +523,29 @@ void Generator::generateCode()
|
||||
// Finally create and initialize the static meta object
|
||||
//
|
||||
if (isQt)
|
||||
fprintf(out, "QT_INIT_METAOBJECT const QMetaObject QObject::staticQtMetaObject = {\n");
|
||||
fprintf(out, "QT_INIT_METAOBJECT const QMetaObject QObject::staticQtMetaObject = { {\n");
|
||||
else
|
||||
fprintf(out, "QT_INIT_METAOBJECT const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData());
|
||||
fprintf(out, "QT_INIT_METAOBJECT const QMetaObject %s::staticMetaObject = { {\n", cdef->qualified.constData());
|
||||
|
||||
if (isQObject)
|
||||
fprintf(out, " { nullptr, ");
|
||||
fprintf(out, " nullptr,\n");
|
||||
else if (cdef->superclassList.size() && (!cdef->hasQGadget || knownGadgets.contains(purestSuperClass)))
|
||||
fprintf(out, " { &%s::staticMetaObject, ", purestSuperClass.constData());
|
||||
fprintf(out, " &%s::staticMetaObject,\n", purestSuperClass.constData());
|
||||
else
|
||||
fprintf(out, " { nullptr, ");
|
||||
fprintf(out, "qt_meta_stringdata_%s.data,\n"
|
||||
" qt_meta_data_%s, ", qualifiedClassNameIdentifier.constData(),
|
||||
fprintf(out, " nullptr,\n");
|
||||
fprintf(out, " qt_meta_stringdata_%s.data,\n"
|
||||
" qt_meta_data_%s,\n", qualifiedClassNameIdentifier.constData(),
|
||||
qualifiedClassNameIdentifier.constData());
|
||||
if (hasStaticMetaCall)
|
||||
fprintf(out, " qt_static_metacall, ");
|
||||
fprintf(out, " qt_static_metacall,\n");
|
||||
else
|
||||
fprintf(out, " nullptr, ");
|
||||
fprintf(out, " nullptr,\n");
|
||||
|
||||
if (extraList.isEmpty())
|
||||
fprintf(out, "nullptr, ");
|
||||
fprintf(out, " nullptr,\n");
|
||||
else
|
||||
fprintf(out, "qt_meta_extradata_%s, ", qualifiedClassNameIdentifier.constData());
|
||||
fprintf(out, "nullptr}\n};\n\n");
|
||||
fprintf(out, " qt_meta_extradata_%s,\n", qualifiedClassNameIdentifier.constData());
|
||||
fprintf(out, " nullptr\n} };\n\n");
|
||||
|
||||
if(isQt)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user