aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-07 08:56:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-16 15:34:22 +0200
commit3c96d427722b5492ac675dfebe8557768b2f82ad (patch)
treea3228514e662878d241f31c9839754c720b2bad8
parentd1306c1efa629842eda2666307375d4d3951c6dc (diff)
Add some more classes from QtConcurrent
This lays the foundation for adding further specializations of QFuture and QFutureWatcher to dependent modules. Task-number: PYSIDE-1202 Change-Id: I82f9940db9d50ced95d4e1388c6460c6efc0469b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt4
-rw-r--r--sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml14
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt1
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml15
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py10
5 files changed, 44 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt b/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
index 145a8bfc3..a6e8cd202 100644
--- a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
@@ -2,6 +2,10 @@ project(QtConcurrent)
set(QtConcurrent_SRC
${QtConcurrent_GEN_DIR}/qtconcurrent_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturevoid_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfutureqstring_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturewatchervoid_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturewatcherqstring_wrapper.cpp
# module is always needed
${QtConcurrent_GEN_DIR}/qtconcurrent_module_wrapper.cpp
)
diff --git a/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml b/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml
index 7e7bd9bcc..ea34150cd 100644
--- a/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml
+++ b/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml
@@ -54,4 +54,18 @@
</extra-includes>
</namespace-type>
+ <typedef-type name="QFutureVoid" source="QFuture&lt;void&gt;" disable-wrapper="yes">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ <modify-function signature="isResultReadyAt(int) const" remove="all"/>
+ </typedef-type>
+ <typedef-type name="QFutureQString" source="QFuture&lt;QString&gt;" disable-wrapper="yes">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ </typedef-type>
+ <typedef-type name="QFutureWatcherVoid" source="QFutureWatcher&lt;void&gt;">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </typedef-type>
+ <typedef-type name="QFutureWatcherQString" source="QFutureWatcher&lt;QString&gt;">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </typedef-type>
+
</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
index 20ed65a67..16a88d2c5 100644
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
@@ -63,6 +63,7 @@ ${QtCore_GEN_DIR}/qfiledevice_wrapper.cpp
${QtCore_GEN_DIR}/qfileinfo_wrapper.cpp
${QtCore_GEN_DIR}/qfilesystemwatcher_wrapper.cpp
${QtCore_GEN_DIR}/qfinalstate_wrapper.cpp
+${QtCore_GEN_DIR}/qfutureinterfacebase_wrapper.cpp
${QtCore_GEN_DIR}/qgenericargument_wrapper.cpp
${QtCore_GEN_DIR}/qgenericreturnargument_wrapper.cpp
${QtCore_GEN_DIR}/qhistorystate_wrapper.cpp
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index 62928f3cf..205e4ef06 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -2908,6 +2908,21 @@
</modify-function>
</value-type>
+ <object-type name="QFutureInterfaceBase">
+ <enum-type name="State"/>
+ </object-type>
+ <value-type name="QFuture" generate="no">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ <modify-function signature="waitForFinished()" allow-thread="yes"/>
+ </value-type>
+ <object-type name="QFutureWatcherBase" generate="no">
+ <modify-function signature="futureInterface()" remove="all"/>
+ <modify-function signature="futureInterface() const" remove="all"/>
+ </object-type>
+ <object-type name="QFutureWatcher" generate="no">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </object-type>
+
<value-type name="QGenericArgument">
<include file-name="qobjectdefs.h" location="global"/>
</value-type>
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 05de5b6de..6fadd19d5 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -494,6 +494,16 @@ def init_PySide2_QtCore():
return locals()
+def init_PySide2_QtConcurrent():
+ type_map.update({
+ "PySide2.QtCore.QFuture[QString]":
+ PySide2.QtConcurrent.QFutureQString,
+ "PySide2.QtCore.QFuture[void]":
+ PySide2.QtConcurrent.QFutureVoid,
+ })
+ return locals()
+
+
def init_PySide2_QtGui():
from PySide2.QtGui import QPageLayout, QPageSize # 5.12 macOS
type_map.update({