diff options
-rw-r--r-- | abstractmetabuilder.cpp | 4 | ||||
-rw-r--r-- | typesystem.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp index facb15ca5..6b2528bfc 100644 --- a/abstractmetabuilder.cpp +++ b/abstractmetabuilder.cpp @@ -385,7 +385,7 @@ bool AbstractMetaBuilder::build(QIODevice* input) if (func->accessPolicy() != CodeModel::Public || func->name().startsWith("operator")) continue; FunctionTypeEntry* funcEntry = types->findFunctionType(func->name()); - if (!funcEntry) + if (!funcEntry || !funcEntry->generateCode()) continue; AbstractMetaFunction* metaFunc = traverseFunction(func); @@ -448,7 +448,7 @@ bool AbstractMetaBuilder::build(QIODevice* input) && !m_metaClasses.findClass(entry->qualifiedCppName())) { ReportHandler::warning(QString("type '%1' is specified in typesystem, but not defined. This could potentially lead to compilation errors.") .arg(entry->qualifiedCppName())); - } else if (entry->type() == TypeEntry::FunctionType) { + } else if (entry->generateCode() && entry->type() == TypeEntry::FunctionType) { const FunctionTypeEntry* fte = static_cast<const FunctionTypeEntry*>(entry); foreach (QString signature, fte->signatures()) { bool ok = false; diff --git a/typesystem.cpp b/typesystem.cpp index 267777564..4d4bdaca5 100644 --- a/typesystem.cpp +++ b/typesystem.cpp @@ -629,6 +629,7 @@ bool Handler::startElement(const QString &, const QString &n, } } else { element->entry = new FunctionTypeEntry(name, signature); + element->entry->setCodeGeneration(m_generate); } } break; |