summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 15:14:50 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 15:14:50 -0300
commite792b618ecf6a6bb19046e4faf4b30dcd01794e7 (patch)
tree1106de5fca377af6caf29e5f8f35fac25e02ace3
parent56eb6c1f44682f10a7ddc041bcbe0424a552e5c3 (diff)
downloadshiboken-e792b618ecf6a6bb19046e4faf4b30dcd01794e7.tar.gz
shiboken-e792b618ecf6a6bb19046e4faf4b30dcd01794e7.tar.xz
shiboken-e792b618ecf6a6bb19046e4faf4b30dcd01794e7.zip
Fixed minor cosmetic issues in the generated code.
-rw-r--r--cppgenerator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index a37ea414..89efd3b3 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -134,8 +134,6 @@ void CppGenerator::generateClass(QTextStream &s, const AbstractMetaClass *metaCl
// headers
s << "// default includes" << endl;
s << "#include <shiboken.h>" << endl;
- s << "#include <vector>" << endl;
- s << "#include <algorithm>" << endl;
if (usePySideExtensions()) {
s << "#include <qsignal.h>" << endl;
s << "#include <qproperty.h>" << endl;
@@ -1641,8 +1639,9 @@ void CppGenerator::writeFunctionCalls(QTextStream& s, const OverloadData& overlo
}
}
}
- s << INDENT << '}' << endl << INDENT << "}";
+ s << INDENT << '}' << endl;
}
+ s << INDENT << '}' << endl;
}
void CppGenerator::writeSingleFunctionCall(QTextStream& s, const OverloadData& overloadData, const AbstractMetaFunction* func)
@@ -1653,8 +1652,6 @@ void CppGenerator::writeSingleFunctionCall(QTextStream& s, const OverloadData& o
return;
}
-
-
const AbstractMetaClass* implementingClass = overloadData.referenceFunction()->implementingClass();
bool usePyArgs = pythonFunctionWrapperUsesListOfArguments(overloadData);
@@ -1698,9 +1695,12 @@ void CppGenerator::writeSingleFunctionCall(QTextStream& s, const OverloadData& o
int numRemovedArgs = OverloadData::numberOfRemovedArguments(func);
s << INDENT << "if(!PyErr_Occurred()) {" << endl;
- writeMethodCall(s, func, func->arguments().size() - numRemovedArgs);
- if (!func->isConstructor())
- writeNoneReturn(s, func, overloadData.hasNonVoidReturnType());
+ {
+ Indentation indentation(INDENT);
+ writeMethodCall(s, func, func->arguments().size() - numRemovedArgs);
+ if (!func->isConstructor())
+ writeNoneReturn(s, func, overloadData.hasNonVoidReturnType());
+ }
s << INDENT << "}" << endl;
}