aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-02-08 18:20:14 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:13:53 -0300
commite9fe87697f53deec9e4bba22599b6992f16d6f0d (patch)
tree3f1f84fe035bf9c1a4f50751cded0a3fbe8d70c2
parentc73c68d7f0cd522ea4b8ecf9e2de4ed040909346 (diff)
Use action="set" instead of action="add" on reference-count tag.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--generator/cppgenerator.cpp4
-rw-r--r--tests/samplebinding/typesystem_sample.xml2
2 files changed, 4 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index bc68f6000..3ff11744d 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2237,8 +2237,10 @@ void CppGenerator::writeMethodCall(QTextStream& s, const AbstractMetaFunction* f
} else if (!refcount_mods.isEmpty()) {
foreach (ArgumentModification arg_mod, refcount_mods) {
- if (arg_mod.referenceCounts.first().action != ReferenceCount::Add)
+ if (arg_mod.referenceCounts.first().action != ReferenceCount::Set) {
+ ReportHandler::warning("\"set\" is the only value supported by Shiboken for action attribute of reference-count tag.");
continue;
+ }
const AbstractMetaClass* wrappedClass = 0;
QString pyArgName = argumentNameFromIndex(func, arg_mod.index, &wrappedClass);
if (pyArgName.isEmpty()) {
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index faa940dfb..b23e7f6db 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -253,7 +253,7 @@
<object-type name="ObjectView">
<modify-function signature="setModel(ObjectModel*)">
<modify-argument index="1">
- <reference-count action="add"/>
+ <reference-count action="set"/>
</modify-argument>
</modify-function>
</object-type>