aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2019-02-01 11:12:43 +0100
committerChristian Tismer <tismer@stackless.com>2019-02-03 18:40:24 +0000
commitf89cb615182fe818bcc17984b4babc40095ac339 (patch)
tree92c78d2fbd49fb4d37aa2ce15a8c65700c6e3a5b
parent509d478c33b6e65a31d41ef2891e489349e20637 (diff)
Unify The Function Formatting In Generated Code
PySide functions are quite uniquely formatted: - There comes some header - Then an opening brace to the very left - Then body text - Then a closing brace. This structure is very quickly parsable with a single regular expression, except: There is a single case where the structure is different. We remove that to save complexity in evaluation tools. Task-number: PYSIDE-803 Change-Id: If868eb4b6a6e0d62ed2f944aeb9227a3bc459458 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index a61095e15..d15f3a951 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -705,7 +705,7 @@ void CppGenerator::writeConstructorNative(QTextStream& s, const AbstractMetaFunc
OriginalTypeDescription | SkipDefaultValues);
s << " : ";
writeFunctionCall(s, func);
- s << " {" << endl;
+ s << endl << "{" << endl;
const AbstractMetaArgument* lastArg = func->arguments().isEmpty() ? 0 : func->arguments().constLast();
writeCodeSnips(s, func->injectedCodeSnips(), TypeSystem::CodeSnipPositionBeginning, TypeSystem::NativeCode, func, lastArg);
s << INDENT << "// ... middle" << endl;