aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-23 11:24:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-23 10:05:56 +0000
commit8526bf4f922df87a0c51d9447bf498a3290dfdbf (patch)
treed422f5900edf953b6fea58c0c355759d0985129e /sources/shiboken2/generator
parent3c9bdc9abaad29b28da57ea4e581a080c8d6c8d5 (diff)
shiboken2: Fix excessively long lines in generated code
Introduce line breaks. As a drive by, remove unneeded self-assignment. Task-number: PYSIDE-1388 Change-Id: Ia9c7cd66814621f02625e3140724483d6b71f1c7 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 4bef348cc..304a7ba4e 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -3536,12 +3536,13 @@ void CppGenerator::writeMethodCall(QTextStream &s, const AbstractMetaFunction *f
if (!avoidProtectedHack() || !func->isProtected()) {
QString virtualCall(methodCall);
QString normalCall(methodCall);
- virtualCall = virtualCall.replace(QLatin1String("%CLASS_NAME"),
- methodCallClassName);
+ virtualCall.replace(QLatin1String("%CLASS_NAME"),
+ methodCallClassName);
normalCall.remove(QLatin1String("::%CLASS_NAME::"));
methodCall.clear();
- mc << "Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self)) ? ";
- mc << virtualCall << " : " << normalCall;
+ mc << "Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))\n"
+ << INDENT << " ? " << virtualCall << '\n'
+ << INDENT << " : " << normalCall;
}
}
}