aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-06-02 13:09:03 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:15:24 -0300
commitb1461f445a4100cee14f2db8c062e3fb087570f1 (patch)
tree314f655596ffb0d31038a9f32f7b53f16c5ce51d /generator
parent48c3f893b3024071bafe04412d52f0086b396f2b (diff)
Make use of Shiboken::warning on virtual function.
Shiboke uses Python warning to report any problems with virtural functions return conversion. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 0875078e4..f436f239f 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -857,10 +857,10 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << INDENT << "if (!typeIsValid) {" << endl;
{
Indentation indent(INDENT);
- s << INDENT << "PyErr_Format(PyExc_TypeError, \"Invalid return value in function %s, expected %s, got %s.\", \""
+ s << INDENT << "Shiboken::warning(PyExc_RuntimeWarning, 2, \"Invalid return value in function %s, expected %s, got %s.\", \""
<< func->ownerClass()->name() << '.' << funcName << "\", " << desiredType
- << ", " PYTHON_RETURN_VAR "->ob_type->tp_name);" << endl;
- s << INDENT << "return " << defaultReturnExpr << ';' << endl;
+ << ", " PYTHON_RETURN_VAR "->ob_type->tp_name);" << endl
+ << INDENT << "return " << defaultReturnExpr << ';' << endl;
}
s << INDENT << "}" << endl;
}