aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
diff options
context:
space:
mode:
authorMatti Airas <matti.p.airas@nokia.com>2010-03-17 17:01:27 -0300
committerMatti Airas <matti.p.airas@nokia.com>2010-03-17 17:01:27 -0300
commitf9b62c6a5b3f7232bb00a5ab39fd8037fc9c7d81 (patch)
treefc0cd615cf9ba10902091bb64867291fd5d6aa1f /cppgenerator.cpp
parent5d89be16960be4aec9ba8c8709e3902794521ce5 (diff)
bugfix: always write the return statement
the return statement within the error block was only written if there was something to return. now an empty statement is written if no return value is expected.
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r--cppgenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index e8de16970..5a4e6a131 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -413,11 +413,12 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
if (func->isAbstract() && func->isModifiedRemoved()) {
s << INDENT << "#warning Pure virtual method \"" << func->ownerClass()->name() << "::" << func->minimalSignature();
s << "\" must be implement but was completely removed on typesystem." << endl;
+ s << INDENT << "return";
if (func->type()) {
- s << INDENT << "return ";
+ s << ' ';
writeMinimalConstructorCallArguments(s, func->type());
- s << ';' << endl;
}
+ s << ';' << endl;
s << '}' << endl << endl;
return;
}