From e9fe87697f53deec9e4bba22599b6992f16d6f0d Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Tue, 8 Feb 2011 18:20:14 -0200 Subject: Use action="set" instead of action="add" on reference-count tag. Reviewer: Luciano Wolf Marcelo Lira --- generator/cppgenerator.cpp | 4 +++- tests/samplebinding/typesystem_sample.xml | 2 +- 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 @@ - + -- cgit v1.2.3