diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-11-24 13:28:50 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-11-26 16:24:29 +0100 |
commit | 13d4520d46e8fad8890ef1d718b8c2b30a2c6267 (patch) | |
tree | 953531d46e5ae745f85e6be5849cad620e2ac07c /sources/shiboken6/generator/shiboken/cppgenerator.cpp | |
parent | ca127cd9b5fe130101333da0ac5b5a09b8373dc2 (diff) |
libpyside: Split up the pyside.h header
Changing something in pyside.h caused excessive recompiling
of all wrappers. Try to amend the situation by splitting up
the header and include only what is needed.
pyside.h remains as a header including the others which will be
emptied out by further changes splitting out QML functionality.
[ChangeLog][PySide6] The header pyside.h has been split into
smaller headers.
Task-number: PYSIDE-1709
Change-Id: I89ff3d9d9bc486f194ad3ec62ed372ff0be960f2
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 4370556ab..eb48b1b10 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -353,7 +353,7 @@ static const char includeQDebug[] = "#ifndef QT_NO_VERSION_TAGGING\n" "# define QT_NO_VERSION_TAGGING\n" "#endif\n" -"#include <QDebug>\n"; +"#include <QtCore/QDebug>\n"; static QString chopType(QString s) { @@ -428,19 +428,21 @@ void CppGenerator::generateClass(TextStream &s, const GeneratorContext &classCon s << "#include <shiboken.h>\n"; if (usePySideExtensions()) { s << includeQDebug; - s << "#include <pysidesignal.h>\n" - << "#include <pysideproperty.h>\n" - << "#include <pyside.h>\n" - << "#include <pysideqenum.h>\n" + if (metaClass->isQObject()) { + s << "#include <pysideqobject.h>\n" + << "#include <pysidesignal.h>\n" + << "#include <pysideproperty.h>\n" + << "#include <signalmanager.h>\n" + << "#include <pysidemetafunction.h>\n"; + } + s << "#include <pysideqenum.h>\n" + << "#include <pysideqmetatype.h>\n" + << "#include <pysideutils.h>\n" << "#include <feature_select.h>\n" << "QT_WARNING_DISABLE_DEPRECATED\n\n"; } s << "#include <typeinfo>\n"; - if (usePySideExtensions() && metaClass->isQObject()) { - s << "#include <signalmanager.h>\n"; - s << "#include <pysidemetafunction.h>\n"; - } // The multiple inheritance initialization function // needs the 'set' class from C++ STL. @@ -6313,7 +6315,7 @@ bool CppGenerator::finishGeneration() if (usePySideExtensions()) { s << includeQDebug; - s << R"(#include <pyside.h> + s << R"(#include <pysidecleanup.h> #include <pysideqenum.h> #include <feature_select.h> )"; |