aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2017-09-30 10:30:50 +0200
committerChristian Tismer <tismer@stackless.com>2018-06-05 16:35:50 +0000
commitf1a63ad5de35a2dd209ba1528cc8b688c1b975ec (patch)
tree2189367b78580b231f26f9f5dee1254c67aa2add
parentf73dd54372d55fb9b3796e3c76af434cb96b5609 (diff)
Signature: Remove post 5.6 parts, fix coding style5.6
Complements 30a1c9c41e5e6d4166f171b9477c6f46cafa782f. Task-number: PYSIDE-510 Change-Id: Ibbcace1eac4e0767a9b8fc6de88dc1ba531ad150 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp14
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp2
2 files changed, 3 insertions, 13 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index ce74c9887..608f893b5 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -4349,18 +4349,10 @@ void CppGenerator::writeSignatureInfo(QTextStream &s, const AbstractMetaFunction
int idx = overloads.length() - 1;
bool multiple = idx > 0;
-// after merging, the #if may be removed!
-#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
- for (const AbstractMetaFunction *f : overloads) {
- QStringList args;
- const AbstractMetaArgumentList &arguments = f->arguments();
- for (AbstractMetaArgument *arg : arguments) {
-#else
foreach (const AbstractMetaFunction *f, overloads) {
QStringList args;
const AbstractMetaArgumentList &arguments = f->arguments();
foreach (const AbstractMetaArgument *arg, arguments) {
-#endif
QString strArg = resolveRetOrArgType(arg->type());
if (!arg->defaultValueExpression().isEmpty()) {
strArg += QLatin1Char('=');
@@ -4378,9 +4370,8 @@ void CppGenerator::writeSignatureInfo(QTextStream &s, const AbstractMetaFunction
// now calculate the return type.
s << funcName << '(' << args.join(QLatin1Char(',')) << ')';
AbstractMetaType *returnType = getTypeWithoutContainer(f->type());
- if (returnType) {
+ if (returnType)
s << "->" << resolveRetOrArgType(returnType);
- }
s << endl;
}
}
@@ -4704,9 +4695,8 @@ void CppGenerator::writeClassRegister(QTextStream &s,
s << "// Multiple signatures have their index \"n:\" in front." << endl;
s << "const char " << initFunctionName << "_SignaturesString[] = \"\"" << endl;
QString line;
- while (signatureStream.readLineInto(&line)) {
+ while (signatureStream.readLineInto(&line))
s << INDENT << '"' << line << "\\n\"" << endl;
- }
s << ';' << endl << endl;
s << "void init_" << initFunctionName;
s << "(PyObject* " << enclosingObjectVariable << ")" << endl;
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index 2b1447140..e50e6347f 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -323,7 +323,7 @@ static const char PySide_PythonCode[] =
" print('Exception:', e)\n"
" traceback.print_exc(file=sys.stdout)\n"
" globals().update(locals())\n"
- ;
+ "";
static safe_globals_struc *
init_phase_1(void)