| 13074 | } |
| 13075 | |
| 13076 | void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, |
| 13077 | const QList<const MetaFunction *> &signalsInTargetLang, |
| 13078 | bool isInterface){ |
| 13079 | Q_UNUSED(isInterface) |
| 13080 | if (!cls) |
| 13081 | return; |
| 13082 | const ComplexTypeEntry *entry = cls->typeEntry(); |
| 13083 | if ((entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem) == TypeEntry::GenerateForSubclass || entry->isIterator()) |
| 13084 | return; |
| 13085 | |
| 13086 | QSet<QString> forwardDeclarations; |
| 13087 | QStringList converterFunctions; |
| 13088 | QString code; |
| 13089 | { |
| 13090 | QTextStream s(&code); |
| 13091 | s << "void initialize_meta_info_" << CppGenerator::toIdString(cls->typeEntry()->qualifiedCppName()) << "(){" << Qt::endl; |
| 13092 | |
| 13093 | { |
| 13094 | INDENTATION(INDENT); |
| 13095 | s << INDENT << "using namespace RegistryAPI;" << Qt::endl; |
| 13096 | if(!cls->typeEntry()->ppCondition().isEmpty()){ |
| 13097 | s << Qt::endl << "#if " << cls->typeEntry()->ppCondition() << Qt::endl << Qt::endl; |
| 13098 | } |
| 13099 | writeCodeInjections(s, cls->typeEntry(), CodeSnip::Beginning, TS::MetaInfo); |
| 13100 | |
| 13101 | const QString qtName = entry->qualifiedCppName(); |
| 13102 | const QString javaTypeName = [entry]()->QString{ |
| 13103 | QString javaPackage = entry->javaPackage(); |
| 13104 | QString javaName = entry->lookupName(); |
| 13105 | if (!javaPackage.isEmpty()) { |
| 13106 | javaName.prepend(javaPackage.replace(".", "/") + "/"); |
| 13107 | } |
| 13108 | if(javaName.endsWith("$ConcreteWrapper")){ |
| 13109 | javaName.chop(16); |
| 13110 | } |
| 13111 | if(javaName.endsWith("$Impl")){ |
| 13112 | javaName.chop(5); |
| 13113 | } |
| 13114 | return javaName; |
| 13115 | }(); |
| 13116 | if(!cls->isNamespace() |
| 13117 | && !cls->isFake() |
| 13118 | && cls->typeEntry()!=database()->qvariantType() |
| 13119 | && cls->typeEntry()!=database()->qcharType() |
| 13120 | && cls->typeEntry()!=database()->qstringType()){ |
| 13121 | |
| 13122 | QString metaTypeRegistration; |
| 13123 | { |
| 13124 | QTextStream s(&metaTypeRegistration); |
| 13125 | CustomFunction customLegacyConstructor = entry->customConstructor(ComplexTypeEntry::LegacyCopyConstructor); |
| 13126 | CustomFunction customCopyConstructor = entry->customConstructor(ComplexTypeEntry::CopyConstructor); |
| 13127 | CustomFunction customMoveConstructor = entry->customConstructor(ComplexTypeEntry::MoveConstructor); |
| 13128 | CustomFunction customDefaultConstructor = entry->customConstructor(ComplexTypeEntry::DefaultConstructor); |
| 13129 | CustomFunction customDestructor = entry->customDestructor(); |
| 13130 | QString constructorCopyName; |
| 13131 | QString constructorDefaultName; |
| 13132 | QString constructorMoveName; |
| 13133 | QString destructorName; |
nothing calls this directly
no test coverage detected