aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2023-11-16 20:37:13 +0100
committerAdrian Herrmann <adrian.herrmann@qt.io>2023-11-24 17:32:48 +0100
commit671c182dce91c387037894017be314564e054c00 (patch)
tree5d8061c027acb70c6fc904ada56176acad3e7628 /sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
parent3a058afcd7ae497c085ea0b0891d164caa38f1fe (diff)
QTimer: Implement singleShot signatures w/ context
On C++, it is possible to call singleShot timers with a context object as an argument. This allows posting events to the event loop of the given context object's thread, instead of the thread of the current thread. Implement corresponding signatures to add this capability to Qt for Python. Pick-to: 6.6 Change-Id: I0c4e3ef4b859cdfaac07415ff64c440821e7f442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index 2ef6a25e5..2011bd3e7 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -2514,12 +2514,18 @@
<include file-name="QtCore/qbuffer.h" location="global"/>
</object-type>
<object-type name="QTimer">
+ <extra-includes>
+ <include file-name="pysidestaticstrings.h" location="global"/>
+ </extra-includes>
<modify-function signature="singleShot(int,const QObject*,const char*)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
</modify-function>
<add-function signature="singleShot(int,PyCallable*)" static="yes">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-2"/>
</add-function>
+ <add-function signature="singleShot(int@msec@,const QObject*@context@,PyCallable*@functor@)" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-functor-context"/>
+ </add-function>
</object-type>
<object-type name="QProcess">
<configuration condition="QT_CONFIG(process)"/>