aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2020-09-07 21:06:10 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-08 10:09:57 +0200
commitc5d47637c7376358a10f0f845e443478058a5430 (patch)
tree2ee604bd443d9eb94f8595b7f881089a3bdd5f0a
parent5d17b88b4567d53b0ee220f32a2936c5d80ba273 (diff)
Add the QWidget *-based overloads of the QtWinExtras functions
Add a pre-header defining QT_WIDGETS_LIB so that they become visible, similar to what is done for QtSql. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Fixes: PYSIDE-1374 Task-number: PYSIDE-487 Change-Id: I0fe1d8c6ca07a79ea9aa1acff00153239ca9a4cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt10
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in5
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml1
3 files changed, 14 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt b/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
index 3593394c3..6c877dfe4 100644
--- a/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
@@ -18,21 +18,27 @@ ${QtWinExtras_GEN_DIR}/qwinthumbnailtoolbutton_wrapper.cpp
${QtWinExtras_GEN_DIR}/qtwinextras_module_wrapper.cpp
)
+configure_file("${QtWinExtras_SOURCE_DIR}/QtWinExtras_global.pre.h.in"
+ "${QtWinExtras_BINARY_DIR}/QtWinExtras_global.pre.h" @ONLY)
+
set(QtWinExtras_include_dirs ${QtWinExtras_SOURCE_DIR}
${QtWinExtras_BINARY_DIR}
${Qt${QT_MAJOR_VERSION}WinExtras_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
${libpyside_SOURCE_DIR})
set(QtWinExtras_libraries pyside2
${Qt${QT_MAJOR_VERSION}WinExtras_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
-set(QtWinExtras_deps QtCore QtGui)
+set(QtWinExtras_deps QtCore QtGui QtWidgets)
create_pyside_module(NAME QtWinExtras
INCLUDE_DIRS QtWinExtras_include_dirs
diff --git a/sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in b/sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in
new file mode 100644
index 000000000..3a2b87c3b
--- /dev/null
+++ b/sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in
@@ -0,0 +1,5 @@
+// QT_WIDGETS_LIB must be defined for the widget functions to become visible.
+
+#if @Qt5Widgets_FOUND@
+# define QT_WIDGETS_LIB
+#endif
diff --git a/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml b/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml
index db7416a24..69c90dd34 100644
--- a/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml
+++ b/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml
@@ -42,6 +42,7 @@
<typesystem package="PySide2.QtWinExtras">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<namespace-type name="QtWin">
<enum-type name="HBitmapFormat"/>