diff --git a/src/pymod/QtCore/QtCoreMain.h b/src/pymod/QtCore/QtCoreMain.h index 2fefe9d7c..6123fd414 100644 --- a/src/pymod/QtCore/QtCoreMain.h +++ b/src/pymod/QtCore/QtCoreMain.h @@ -23,14 +23,19 @@ // To force linking of the QtCore module #include "../../gsiqt/qtbasic/gsiQtCoreExternals.h" FORCE_LINK_GSI_QTCORE +#undef FORCE_LINK_GSI_QTCORE +#define FORCE_LINK_GSI_QTCORE // And this is *only* required because of QSignalMapper which takes a QWidget argument from // the QtGui library and we need to supply the GSI binding for this ... #include "../../gsiqt/qtbasic/gsiQtGuiExternals.h" FORCE_LINK_GSI_QTGUI +#undef FORCE_LINK_GSI_QTGUI +#define FORCE_LINK_GSI_QTGUI // And because we pull in QtGui, we also need to pull in QtWidgets because QtGui bindings // use QAction and QWidget which are itself in QtWidgets #include "../../gsiqt/qtbasic/gsiQtWidgetsExternals.h" FORCE_LINK_GSI_QTWIDGETS - +#undef FORCE_LINK_GSI_QTWIDGETS +#define FORCE_LINK_GSI_QTWIDGETS diff --git a/src/pymod/QtCore5Compat/QtCore5CompatMain.h b/src/pymod/QtCore5Compat/QtCore5CompatMain.h index dac584ad5..d4ff15247 100644 --- a/src/pymod/QtCore5Compat/QtCore5CompatMain.h +++ b/src/pymod/QtCore5Compat/QtCore5CompatMain.h @@ -23,3 +23,6 @@ // To force linking of the QtCore5Compat module #include "../../gsiqt/qtbasic/gsiQtCore5CompatExternals.h" FORCE_LINK_GSI_QTCORE5COMPAT +#undef FORCE_LINK_GSI_QTCORE5COMPAT +#define FORCE_LINK_GSI_QTCORE5COMPAT + diff --git a/src/pymod/QtDesigner/QtDesignerMain.h b/src/pymod/QtDesigner/QtDesignerMain.h index 79f8a7c4f..9f5664161 100644 --- a/src/pymod/QtDesigner/QtDesignerMain.h +++ b/src/pymod/QtDesigner/QtDesignerMain.h @@ -23,3 +23,5 @@ // To force linking of the QtDesigner module #include "../../gsiqt/qtbasic/gsiQtDesignerExternals.h" FORCE_LINK_GSI_QTDESIGNER +#undef FORCE_LINK_GSI_QTDESIGNER +#define FORCE_LINK_GSI_QTDESIGNER diff --git a/src/pymod/QtGui/QtGuiMain.h b/src/pymod/QtGui/QtGuiMain.h index 87decc396..c53d0f641 100644 --- a/src/pymod/QtGui/QtGuiMain.h +++ b/src/pymod/QtGui/QtGuiMain.h @@ -23,8 +23,12 @@ // To force linking of the QtGui module #include "../../gsiqt/qtbasic/gsiQtGuiExternals.h" FORCE_LINK_GSI_QTGUI +#undef FORCE_LINK_GSI_QTGUI +#define FORCE_LINK_GSI_QTGUI // This is required because QAction and QWidget are used are arguments in QtGui, but are // defined in QtWidgets #include "../../gsiqt/qtbasic/gsiQtWidgetsExternals.h" FORCE_LINK_GSI_QTWIDGETS +#undef FORCE_LINK_GSI_QTWIDGETS +#define FORCE_LINK_GSI_QTWIDGETS diff --git a/src/pymod/QtNetwork/QtNetworkMain.h b/src/pymod/QtNetwork/QtNetworkMain.h index 2285fabb3..1060a4a81 100644 --- a/src/pymod/QtNetwork/QtNetworkMain.h +++ b/src/pymod/QtNetwork/QtNetworkMain.h @@ -23,3 +23,5 @@ // To force linking of the QtNetwork module #include "../../gsiqt/qtbasic/gsiQtNetworkExternals.h" FORCE_LINK_GSI_QTNETWORK +#undef FORCE_LINK_GSI_QTNETWORK +#define FORCE_LINK_GSI_QTNETWORK diff --git a/src/pymod/QtPrintSupport/QtPrintSupportMain.h b/src/pymod/QtPrintSupport/QtPrintSupportMain.h index 453a9714b..f75935381 100644 --- a/src/pymod/QtPrintSupport/QtPrintSupportMain.h +++ b/src/pymod/QtPrintSupport/QtPrintSupportMain.h @@ -23,3 +23,5 @@ // To force linking of the QtPrintSupport module #include "../../gsiqt/qtbasic/gsiQtPrintSupportExternals.h" FORCE_LINK_GSI_QTPRINTSUPPORT +#undef FORCE_LINK_GSI_QTPRINTSUPPORT +#define FORCE_LINK_GSI_QTPRINTSUPPORT diff --git a/src/pymod/QtSql/QtSqlMain.cc b/src/pymod/QtSql/QtSqlMain.cc index 9db124b2d..1883472dc 100644 --- a/src/pymod/QtSql/QtSqlMain.cc +++ b/src/pymod/QtSql/QtSqlMain.cc @@ -22,5 +22,5 @@ #include "../pymodHelper.h" -#include "QtSqtMain.h" +#include "QtSqlMain.h" DEFINE_PYMOD(QtSql, "QtSql", "KLayout/Qt module 'QtSql'") diff --git a/src/pymod/QtSql/QtSqlMain.h b/src/pymod/QtSql/QtSqlMain.h index e16c0b0de..4e70d2ae5 100644 --- a/src/pymod/QtSql/QtSqlMain.h +++ b/src/pymod/QtSql/QtSqlMain.h @@ -23,3 +23,5 @@ // To force linking of the QtSql module #include "../../gsiqt/qtbasic/gsiQtSqlExternals.h" FORCE_LINK_GSI_QTSQL +#undef FORCE_LINK_GSI_QTSQL +#define FORCE_LINK_GSI_QTSQL diff --git a/src/pymod/QtSvg/QtSvgMain.h b/src/pymod/QtSvg/QtSvgMain.h index e5cc9d372..61a07497d 100644 --- a/src/pymod/QtSvg/QtSvgMain.h +++ b/src/pymod/QtSvg/QtSvgMain.h @@ -23,3 +23,5 @@ // To force linking of the QtSvg module #include "../../gsiqt/qtbasic/gsiQtSvgExternals.h" FORCE_LINK_GSI_QTSVG +#undef FORCE_LINK_GSI_QTSVG +#define FORCE_LINK_GSI_QTSVG diff --git a/src/pymod/QtUiTools/QtUiToolsMain.h b/src/pymod/QtUiTools/QtUiToolsMain.h index ca08435a8..9395560b4 100644 --- a/src/pymod/QtUiTools/QtUiToolsMain.h +++ b/src/pymod/QtUiTools/QtUiToolsMain.h @@ -23,7 +23,11 @@ // To force linking of the QtCore module #include "../../gsiqt/qtbasic/gsiQtCoreExternals.h" FORCE_LINK_GSI_QTCORE +#undef FORCE_LINK_GSI_QTCORE +#define FORCE_LINK_GSI_QTCORE # include "../../gsiqt/qtbasic/gsiQtUiToolsExternals.h" FORCE_LINK_GSI_QTUITOOLS +#undef FORCE_LINK_GSI_QTUITOOLS +#define FORCE_LINK_GSI_QTUITOOLS diff --git a/src/pymod/QtWidgets/QtWidgetsMain.h b/src/pymod/QtWidgets/QtWidgetsMain.h index 43b313474..a7e073dd4 100644 --- a/src/pymod/QtWidgets/QtWidgetsMain.h +++ b/src/pymod/QtWidgets/QtWidgetsMain.h @@ -23,3 +23,5 @@ // To force linking of the QtWidgets module #include "../../gsiqt/qtbasic/gsiQtWidgetsExternals.h" FORCE_LINK_GSI_QTWIDGETS +#undef FORCE_LINK_GSI_QTWIDGETS +#define FORCE_LINK_GSI_QTWIDGETS diff --git a/src/pymod/QtXml/QtXmlMain.h b/src/pymod/QtXml/QtXmlMain.h index e9ce9e1f4..c37ca9cb9 100644 --- a/src/pymod/QtXml/QtXmlMain.h +++ b/src/pymod/QtXml/QtXmlMain.h @@ -23,19 +23,27 @@ // To force linking of the QtXml module #include "../../gsiqt/qtbasic/gsiQtXmlExternals.h" FORCE_LINK_GSI_QTXML +#undef FORCE_LINK_GSI_QTXML +#define FORCE_LINK_GSI_QTXML // To force linking of the QtCore module (some arguments // are QIODevice or QTextStream) #include "../../gsiqt/qtbasic/gsiQtCoreExternals.h" FORCE_LINK_GSI_QTCORE +#undef FORCE_LINK_GSI_QTCORE +#define FORCE_LINK_GSI_QTCORE // And because will pull in QtCore: // This is *only* required because of QSignalMapper which takes a QWidget argument from // the QtGui library and we need to supply the GSI binding for this ... #include "../../gsiqt/qtbasic/gsiQtGuiExternals.h" FORCE_LINK_GSI_QTGUI +#undef FORCE_LINK_GSI_QTGUI +#define FORCE_LINK_GSI_QTGUI // And because we pull in QtGui, we also need to pull in QtWidgets because QtGui bindings // use QAction and QWidget which are itself in QtWidgets #include "../../gsiqt/qtbasic/gsiQtWidgetsExternals.h" FORCE_LINK_GSI_QTWIDGETS +#undef FORCE_LINK_GSI_QTWIDGETS +#define FORCE_LINK_GSI_QTWIDGETS diff --git a/src/pymod/QtXmlPatterns/QtXmlPatternsMain.h b/src/pymod/QtXmlPatterns/QtXmlPatternsMain.h index 9f0b1f7cc..faceffe97 100644 --- a/src/pymod/QtXmlPatterns/QtXmlPatternsMain.h +++ b/src/pymod/QtXmlPatterns/QtXmlPatternsMain.h @@ -23,8 +23,12 @@ // To force linking of the QtXmlPatterns module #include "../../gsiqt/qtbasic/gsiQtXmlPatternsExternals.h" FORCE_LINK_GSI_QTXMLPATTERNS +#undef FORCE_LINK_GSI_QTXMLPATTERNS +#define FORCE_LINK_GSI_QTXMLPATTERNS // To force linking of the QtNetwork module (some arguments // are QNetworkAccessManager) #include "../../gsiqt/qtbasic/gsiQtNetworkExternals.h" FORCE_LINK_GSI_QTNETWORK +#undef FORCE_LINK_GSI_QTNETWORK +#define FORCE_LINK_GSI_QTNETWORK diff --git a/src/pymod/pya/pyaMain.cc b/src/pymod/pya/pyaMain.cc index 1d7e7ce3d..f6ec0ad10 100644 --- a/src/pymod/pya/pyaMain.cc +++ b/src/pymod/pya/pyaMain.cc @@ -30,37 +30,37 @@ #if defined(HAVE_QT) # if defined(HAVE_QTBINDINGS) -# include "QtCore/QtCoreMain.h" -# include "QtGui/QtGuiMain.h" +# include "../QtCore/QtCoreMain.h" +# include "../QtGui/QtGuiMain.h" # if defined(INCLUDE_QTNETWORK) -# include "QtNetwork/QtNetworkMain.h" +# include "../QtNetwork/QtNetworkMain.h" # endif # if defined(INCLUDE_QTWIDGETS) -# include "QtWidgets/QtWidgetsMain.h" +# include "../QtWidgets/QtWidgetsMain.h" # endif # if defined(INCLUDE_QTPRINTSUPPORT) -# include "QtPrintSupport/QtPrintSupportMain.h" +# include "../QtPrintSupport/QtPrintSupportMain.h" # endif # if defined(INCLUDE_QTSVG) -# include "QtSvg/QtSvgMain.h" +# include "../QtSvg/QtSvgMain.h" # endif # if defined(INCLUDE_QTXML) -# include "QtXml/QtXmlMain.h" +# include "../QtXml/QtXmlMain.h" # endif # if defined(INCLUDE_QTXMLPATTERNS) -# include "QtXmlPatterns/QtXmlPatternsMain.h" +# include "../QtXmlPatterns/QtXmlPatternsMain.h" # endif # if defined(INCLUDE_QTSQL) -# include "QtSql/QtSqlMain.h" +# include "../QtSql/QtSqlMain.h" # endif # if defined(INCLUDE_QTDESIGNER) -# include "QtDesigner/QtDesignerMain.h" +# include "../QtDesigner/QtDesignerMain.h" # endif # if defined(INCLUDE_QTUITOOLS) -# include "QtUiTools/QtUiToolsMain.h" +# include "../QtUiTools/QtUiToolsMain.h" # endif # if defined(INCLUDE_QTCORE5COMPAT) -# include "QtCore5Compat/QtCore5CompatMain.h" +# include "../QtCore5Compat/QtCore5CompatMain.h" # endif # endif #endif diff --git a/testdata/python/basic.py b/testdata/python/basic.py index 5b4ca230b..d95b8527b 100644 --- a/testdata/python/basic.py +++ b/testdata/python/basic.py @@ -2020,11 +2020,11 @@ class BasicTest(unittest.TestCase): # Hint: QApplication creates some leaks (FT, GTK). Hence it must not be used in the leak_check case .. if not leak_check: a = pya.QCoreApplication.instance() - self.assertEqual("", str(type(a))) + self.assertEqual("", str(type(a))) qd = pya.QDialog() pya.QApplication.setActiveWindow(qd) self.assertEqual(repr(pya.QApplication.activeWindow), repr(qd)) - self.assertEqual("", str(type(pya.QApplication.activeWindow))) + self.assertEqual("", str(type(pya.QApplication.activeWindow))) qd._destroy() self.assertEqual(repr(pya.QApplication.activeWindow), "None")