diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-02-17 16:51:22 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-02-17 17:02:32 -0300 |
commit | 9dac886d87f546bd9d2ed3162192c0af5f733b74 (patch) | |
tree | a44b977b13a8954f31b0d78b976129061aa0cccd /cppgenerator.cpp | |
parent | 21151a2f4dc03ef6d62efcfb4a0f1f9d3dcb5183 (diff) |
The generator takes "default ownership" modifications into account.
The default ownership does nothing. This is useful to avoid automatic
heuristically based generation of code defining parenting.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r-- | cppgenerator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index bd4faea33..20c4540ee 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -1518,6 +1518,11 @@ void CppGenerator::writeMethodCall(QTextStream& s, const AbstractMetaFunction* f break; } + // The default ownership does nothing. This is useful to avoid automatic heuristically + // based generation of code defining parenting. + if (arg_mod.ownerships[TypeSystem::TargetLangCode] == TypeSystem::DefaultOwnership) + continue; + s << INDENT; if (arg_mod.ownerships[TypeSystem::TargetLangCode] == TypeSystem::TargetLangOwnership) { s << "SbkBaseWrapper_setOwnership(" << pyArgName << ", true);"; |