aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-23 16:27:01 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:01 -0300
commitd8b38821c1a2c4405506cefcf3dba284cbf2162d (patch)
treebd02bcffe2b13501c8650e32b288db055b6ce390 /abstractmetabuilder.cpp
parent1e2a9f164bfd612c1ee102a9847309f39e1e92d2 (diff)
Do not generate bindings for global functions when the typesystem was loaded with generate=no.
Reviewer: Lauro Moura <lauro.neto@openbossa.org> Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index facb15ca..6b2528bf 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;