diff options
author | Christian Tismer <tismer@stackless.com> | 2017-06-04 19:53:50 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2017-06-09 12:46:43 +0000 |
commit | 5ff239ac4f1b34e2b3317f0968a61658d8c586d6 (patch) | |
tree | a21c090bf607467126740d475e7eedb3a7b402bf /sources/shiboken2/generator/shiboken2/cppgenerator.cpp | |
parent | e25ed8d09b67a0b67dee4239513c00a6b7e701a4 (diff) |
Fix missing headers in PySide custom build
PySide itself built fine after the additional includes were added for inheritance.
But when a smaller project is built, suddenly header files are not found,
because the inherited names are not expected by the deployment.
Therefore, we do no longer add more includes, but insert recursive headers
for the few relevant cases. So the includes become a little longer, but the
names of the include files are those as before the enhanced inheritance.
Task-number: PYSIDE-500
Change-Id: Iab456307a3c2365dfe1964dbe222b7d0efac7878
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 68b62477e..06300fc00 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -251,17 +251,6 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext) headerfile.replace(QLatin1String(".cpp"), QLatin1String(".h")); s << endl << "// main header" << endl << "#include \"" << headerfile << '"' << endl; - // PYSIDE-500: Use also includes for inherited wrapper classes, because - // without the protected hack, we sometimes need to cast inherited wrappers. - s << endl << "// inherited wrapper classes" << endl; - AbstractMetaClass *basis = metaClass->baseClass(); - for (; basis; basis = basis->baseClass()) { - GeneratorContext basisContext(basis); - QString headerfile = fileNameForContext(basisContext); - headerfile.replace(QLatin1String(".cpp"), QLatin1String(".h")); - s << "#include \"" << headerfile << '"' << endl; - } - s << endl << "// inner classes" << endl; foreach (AbstractMetaClass* innerClass, metaClass->innerClasses()) { GeneratorContext innerClassContext(innerClass); |