aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6')
-rw-r--r--sources/pyside6/PySide6/CMakeLists.txt8
-rw-r--r--sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt6
-rw-r--r--sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml11
-rw-r--r--sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt7
-rw-r--r--sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml36
-rw-r--r--sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt5
-rw-r--r--sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml15
-rw-r--r--sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml8
-rw-r--r--sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml3
-rw-r--r--sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt19
-rw-r--r--sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml56
-rw-r--r--sources/pyside6/PySide6/QtAsyncio/__init__.py60
-rw-r--r--sources/pyside6/PySide6/QtAsyncio/events.py609
-rw-r--r--sources/pyside6/PySide6/QtAsyncio/futures.py115
-rw-r--r--sources/pyside6/PySide6/QtAsyncio/tasks.py157
-rw-r--r--sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml3
-rw-r--r--sources/pyside6/PySide6/QtBluetooth/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml31
-rw-r--r--sources/pyside6/PySide6/QtCharts/CMakeLists.txt9
-rw-r--r--sources/pyside6/PySide6/QtCharts/typesystem_charts.xml6
-rw-r--r--sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt14
-rw-r--r--sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml6
-rw-r--r--sources/pyside6/PySide6/QtCore/CMakeLists.txt83
-rw-r--r--sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in1
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/core_snippets.cpp111
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/core_snippets_p.h54
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/qiopipe.cpp142
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/qtcorehelper.cpp18
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core.xml3
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml960
-rw-r--r--sources/pyside6/PySide6/QtDBus/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtDBus/typesystem_dbus.xml14
-rw-r--r--sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt9
-rw-r--r--sources/pyside6/PySide6/QtDataVisualization/qtdatavisualization_helper.cpp16
-rw-r--r--sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml82
-rw-r--r--sources/pyside6/PySide6/QtDesigner/CMakeLists.txt14
-rw-r--r--sources/pyside6/PySide6/QtDesigner/qpydesignercustomwidgetcollection.cpp4
-rw-r--r--sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml6
-rw-r--r--sources/pyside6/PySide6/QtGraphs/CMakeLists.txt100
-rw-r--r--sources/pyside6/PySide6/QtGraphs/qtgraphs_helper.cpp97
-rw-r--r--sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml303
-rw-r--r--sources/pyside6/PySide6/QtGui/CMakeLists.txt119
-rw-r--r--sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in4
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui.xml4
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml667
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_rhi.xml176
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml9
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml5
-rw-r--r--sources/pyside6/PySide6/QtHelp/CMakeLists.txt7
-rw-r--r--sources/pyside6/PySide6/QtHelp/typesystem_help.xml16
-rw-r--r--sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt10
-rw-r--r--sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml7
-rw-r--r--sources/pyside6/PySide6/QtLocation/CMakeLists.txt7
-rw-r--r--sources/pyside6/PySide6/QtLocation/typesystem_location.xml12
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt16
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml42
-rw-r--r--sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt11
-rw-r--r--sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml3
-rw-r--r--sources/pyside6/PySide6/QtNetwork/CMakeLists.txt15
-rw-r--r--sources/pyside6/PySide6/QtNetwork/typesystem_network.xml251
-rw-r--r--sources/pyside6/PySide6/QtNetworkAuth/CMakeLists.txt5
-rw-r--r--sources/pyside6/PySide6/QtNetworkAuth/typesystem_networkauth.xml5
-rw-r--r--sources/pyside6/PySide6/QtNfc/CMakeLists.txt4
-rw-r--r--sources/pyside6/PySide6/QtNfc/typesystem_nfc.xml6
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt70
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/QtOpenGL_global.post.h.in10
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/glue/utils.cpp40
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_includes.xml1
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_modifications.xml18
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_includes.xml5
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_modifications.xml36
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml367
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications1_0_compat.xml2
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_1.xml20
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_4.xml4
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_5.xml2
-rw-r--r--sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt7
-rw-r--r--sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml4
-rw-r--r--sources/pyside6/PySide6/QtPdf/CMakeLists.txt42
-rw-r--r--sources/pyside6/PySide6/QtPdf/typesystem_pdf.xml35
-rw-r--r--sources/pyside6/PySide6/QtPdfWidgets/CMakeLists.txt39
-rw-r--r--sources/pyside6/PySide6/QtPdfWidgets/typesystem_pdfwidgets.xml17
-rw-r--r--sources/pyside6/PySide6/QtPositioning/CMakeLists.txt15
-rw-r--r--sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml11
-rw-r--r--sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt14
-rw-r--r--sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml3
-rw-r--r--sources/pyside6/PySide6/QtQml/CMakeLists.txt5
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp42
-rw-r--r--sources/pyside6/PySide6/QtQml/typesystem_qml.xml92
-rw-r--r--sources/pyside6/PySide6/QtQuick/CMakeLists.txt51
-rw-r--r--sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp13
-rw-r--r--sources/pyside6/PySide6/QtQuick/typesystem_quick.xml99
-rw-r--r--sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt25
-rw-r--r--sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml5
-rw-r--r--sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt24
-rw-r--r--sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml6
-rw-r--r--sources/pyside6/PySide6/QtQuickTest/CMakeLists.txt44
-rw-r--r--sources/pyside6/PySide6/QtQuickTest/typesystem_quicktest.xml33
-rw-r--r--sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt20
-rw-r--r--sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml3
-rw-r--r--sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt16
-rw-r--r--sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml22
-rw-r--r--sources/pyside6/PySide6/QtScxml/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml17
-rw-r--r--sources/pyside6/PySide6/QtSensors/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml3
-rw-r--r--sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt66
-rw-r--r--sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml118
-rw-r--r--sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml5
-rw-r--r--sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt11
-rw-r--r--sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml3
-rw-r--r--sources/pyside6/PySide6/QtSql/CMakeLists.txt11
-rw-r--r--sources/pyside6/PySide6/QtSql/typesystem_sql.xml14
-rw-r--r--sources/pyside6/PySide6/QtStateMachine/CMakeLists.txt13
-rw-r--r--sources/pyside6/PySide6/QtStateMachine/typesystem_statemachine.xml8
-rw-r--r--sources/pyside6/PySide6/QtSvg/CMakeLists.txt15
-rw-r--r--sources/pyside6/PySide6/QtSvg/typesystem_svg.xml7
-rw-r--r--sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt13
-rw-r--r--sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml3
-rw-r--r--sources/pyside6/PySide6/QtTest/CMakeLists.txt12
-rw-r--r--sources/pyside6/PySide6/QtTest/typesystem_test.xml31
-rw-r--r--sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt7
-rw-r--r--sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml4
-rw-r--r--sources/pyside6/PySide6/QtUiTools/CMakeLists.txt14
-rw-r--r--sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml41
-rw-r--r--sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt14
-rw-r--r--sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml6
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt28
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml68
-rw-r--r--sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt12
-rw-r--r--sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml3
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt18
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml3
-rw-r--r--sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt20
-rw-r--r--sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml3
-rw-r--r--sources/pyside6/PySide6/QtWidgets/CMakeLists.txt15
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml3
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml257
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt48
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in5
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml30
-rw-r--r--sources/pyside6/PySide6/QtXml/CMakeLists.txt4
-rw-r--r--sources/pyside6/PySide6/QtXml/typesystem_xml.xml29
-rw-r--r--sources/pyside6/PySide6/__init__.py.in20
-rw-r--r--sources/pyside6/PySide6/_config.py.in1
-rw-r--r--sources/pyside6/PySide6/doc/qtqml_functions.rst152
-rw-r--r--sources/pyside6/PySide6/doc/qtquicktest.rst62
-rw-r--r--sources/pyside6/PySide6/doc/qtuitools.rst68
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp927
-rw-r--r--sources/pyside6/PySide6/glue/qtdatavisualization.cpp38
-rw-r--r--sources/pyside6/PySide6/glue/qtgraphs.cpp8
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp219
-rw-r--r--sources/pyside6/PySide6/glue/qtmultimedia.cpp6
-rw-r--r--sources/pyside6/PySide6/glue/qtnetwork.cpp86
-rw-r--r--sources/pyside6/PySide6/glue/qtnetworkauth.cpp43
-rw-r--r--sources/pyside6/PySide6/glue/qtopengl.cpp16
-rw-r--r--sources/pyside6/PySide6/glue/qtpositioning.cpp14
-rw-r--r--sources/pyside6/PySide6/glue/qtqml.cpp26
-rw-r--r--sources/pyside6/PySide6/glue/qtquick.cpp21
-rw-r--r--sources/pyside6/PySide6/glue/qtquicktest.cpp50
-rw-r--r--sources/pyside6/PySide6/glue/qtserialbus.cpp30
-rw-r--r--sources/pyside6/PySide6/glue/qtstatemachine.cpp3
-rw-r--r--sources/pyside6/PySide6/glue/qtuitools.cpp40
-rw-r--r--sources/pyside6/PySide6/glue/qtwebenginecore.cpp68
-rw-r--r--sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp6
-rw-r--r--sources/pyside6/PySide6/glue/qtwidgets.cpp143
-rw-r--r--sources/pyside6/PySide6/pysidewtypes.h12
-rw-r--r--sources/pyside6/PySide6/qiopipe.h36
-rw-r--r--sources/pyside6/PySide6/qpydesignerextensions.h8
-rw-r--r--sources/pyside6/PySide6/qpyqmlparserstatus.h4
-rw-r--r--sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h4
-rw-r--r--sources/pyside6/PySide6/qpytextobject.h3
-rw-r--r--sources/pyside6/PySide6/qtcorehelper.h18
-rw-r--r--sources/pyside6/PySide6/qtdbushelper.h3
-rw-r--r--sources/pyside6/PySide6/qtgraphs_helper.h19
-rw-r--r--sources/pyside6/PySide6/qtguihelper.h4
-rw-r--r--sources/pyside6/PySide6/support/deprecated.py23
-rw-r--r--sources/pyside6/PySide6/support/generate_pyi.py19
-rw-r--r--sources/pyside6/PySide6/templates/core_common.xml9
-rw-r--r--sources/pyside6/PySide6/templates/gui_common.xml11
184 files changed, 7225 insertions, 1865 deletions
diff --git a/sources/pyside6/PySide6/CMakeLists.txt b/sources/pyside6/PySide6/CMakeLists.txt
index 95693ff67..37b7a6c9c 100644
--- a/sources/pyside6/PySide6/CMakeLists.txt
+++ b/sources/pyside6/PySide6/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(pyside6)
# Configure include based on platform
@@ -90,6 +93,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_config.py"
DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside6_SUFFIX}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py"
DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside6_SUFFIX}")
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/support"
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside6_SUFFIX}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/common.xml
DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/core_common.xml
@@ -104,3 +109,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/opengl_common.xml
DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside6_global.h
DESTINATION include/${BINDING_NAME}${pyside6_SUFFIX})
+
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/QtAsyncio"
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside6_SUFFIX}")
diff --git a/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt
index e81882e79..d9169924e 100644
--- a/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DAnimation)
set(Qt3DAnimation_SRC
@@ -16,6 +19,7 @@ ${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationcliploader_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationcontroller_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationgroup_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qblendedclipanimator_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qcallbackmapping_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qchannel_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qchannelcomponent_wrapper.cpp
${Qt3DAnimation_GEN_DIR}/qt3danimation_qchannelmapper_wrapper.cpp
@@ -39,12 +43,14 @@ set(Qt3DAnimation_include_dirs
${pyside6_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIR}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DCore_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DRender_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DAnimation_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
+ ${QtOpenGL_GEN_DIR}
${Qt3DCore_GEN_DIR}
${Qt3DRender_GEN_DIR}
${Qt3DAnimation_GEN_DIR})
diff --git a/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml b/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml
index d287c3db9..61af82d6d 100644
--- a/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml
+++ b/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml
@@ -4,11 +4,14 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DAnimation">
+<typesystem package="PySide6.Qt3DAnimation"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
<namespace-type name="Qt3DAnimation">
<object-type name="QAbstractAnimation">
<enum-type name="AnimationType"/>
+ <!-- Disambiguate from QtCore/qabstractanimation.h -->
+ <include file-name="Qt3DAnimation/qabstractanimation.h" location="global"/>
</object-type>
<object-type name="QAbstractAnimationClip"/>
<value-type name="QAnimationClipData" since="6.1"/>
@@ -27,10 +30,14 @@
<enum-type name="Status"/>
</object-type>
<object-type name="QAnimationController"/>
- <object-type name="QAnimationGroup"/>
+ <object-type name="QAnimationGroup">
+ <!-- Disambiguate from QtCore/qanimationgroup.h -->
+ <include file-name="Qt3DAnimation/qanimationgroup.h" location="global"/>
+ </object-type>
<object-type name="QBlendedClipAnimator"/>
<value-type name="QChannel"/>
<value-type name="QChannelComponent"/>
+ <object-type name="QCallbackMapping"/>
<object-type name="QChannelMapper" since="6.1"/>
<object-type name="QChannelMapping"/>
<object-type name="QClipAnimator"/>
diff --git a/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt
index 10c4477fa..cd2699f11 100644
--- a/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt
@@ -1,6 +1,12 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DCore)
set(Qt3DCore_SRC
+${Qt3DCore_GEN_DIR}/qsharedpointer_qaspectjob_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qsharedpointer_qbackendnodemapper_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qsharedpointer_qentity_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qabstractaspect_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qabstractfunctor_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qabstractskeleton_wrapper.cpp
@@ -13,6 +19,7 @@ ${Qt3DCore_GEN_DIR}/qt3dcore_qbackendnodemapper_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qboundingvolume_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qbuffer_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qcomponent_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qcoreaspect_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qcoresettings_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qentity_wrapper.cpp
${Qt3DCore_GEN_DIR}/qt3dcore_qgeometry_wrapper.cpp
diff --git a/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml b/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml
index b49a57e9c..985c459b6 100644
--- a/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml
+++ b/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml
@@ -4,15 +4,19 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DCore">
+<typesystem package="PySide6.Qt3DCore"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <smart-pointer-type name="QSharedPointer" type="shared" getter="data"
+ reset-method="reset"
+ instantiations="Qt3DCore::QAspectJob=Qt3DCore::QAspectJobPtr,Qt3DCore::QBackendNodeMapper=Qt3DCore::QBackendNodeMapperPtr,Qt3DCore::QEntity=Qt3DCore::QEntityPtr"/>
<namespace-type name="Qt3DCore" generate-using="no">
<object-type name="QAbstractAspect"/>
- <object-type name="QAbstractFunctor" since="6.0"/>
- <object-type name="QAbstractSkeleton" since="5.10"/>
- <object-type name="QArmature" since="5.10"/>
+ <object-type name="QAbstractFunctor"/>
+ <object-type name="QAbstractSkeleton"/>
+ <object-type name="QArmature"/>
<object-type name="QAspectEngine">
- <enum-type name="RunMode" since="5.14"/>
+ <enum-type name="RunMode"/>
<modify-function signature="registerAspect(Qt3DCore::QAbstractAspect*)">
<modify-argument index="this">
<parent index="1" action="add"/>
@@ -31,10 +35,12 @@
<!-- TODO: Solve issues related to windows and a unresolved
external symbol
<object-type name="QBackendNodeMapper"/>-->
- <object-type name="QBoundingVolume" since="6.0"/>
- <object-type name="QBuffer" since="6.0">
+ <object-type name="QBoundingVolume"/>
+ <object-type name="QBuffer">
<enum-type name="AccessType"/>
<enum-type name="UsageType"/>
+ <!-- Disambiguate from QtCore/qbuffer.h -->
+ <include file-name="Qt3DCore/qbuffer.h" location="global"/>
</object-type>
<object-type name="QComponent"/>
<object-type name="QEntity">
@@ -44,12 +50,13 @@
</modify-argument>
</modify-function>
</object-type>
+ <object-type name="QCoreAspect"/>
<object-type name="QCoreSettings"/>
- <object-type name="QGeometry" since="6.0"/>
- <object-type name="QGeometryView" since="6.0">
+ <object-type name="QGeometry"/>
+ <object-type name="QGeometryView">
<enum-type name="PrimitiveType"/>
</object-type>
- <object-type name="QJoint" since="5.10">
+ <object-type name="QJoint">
<modify-function signature="addChildJoint(Qt3DCore::QJoint*)">
<modify-argument index="this">
<parent index="1" action="add"/>
@@ -59,8 +66,8 @@
<object-type name="QNode"/>
<value-type name="QNodeId"/>
<value-type name="QNodeIdTypePair"/>
- <object-type name="QSkeleton" since="5.10"/>
- <object-type name="QSkeletonLoader" since="5.10">
+ <object-type name="QSkeleton"/>
+ <object-type name="QSkeletonLoader">
<enum-type name="Status"/>
</object-type>
<object-type name="QTransform">
@@ -69,6 +76,7 @@
</object-type>
</namespace-type>
- <!-- reject Qt enum helper functions in Qt3D namespaces -->
- <rejection class="^Qt3D.*$" function-name="^qt_getEnum.*$"/>
+ <!-- QtNetwork is pulled in via QtBluetoothDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt
index 181672c34..6f6f637fe 100644
--- a/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DExtras)
set(Qt3DExtras_SRC
@@ -57,12 +60,14 @@ set(Qt3DExtras_include_dirs
${pyside6_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DCore_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DRender_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}3DExtras_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
+ ${QtOpenGL_GEN_DIR}
${Qt3DCore_GEN_DIR}
${Qt3DRender_GEN_DIR})
diff --git a/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml b/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml
index 19dda8f7c..d281ae15f 100644
--- a/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml
+++ b/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml
@@ -4,13 +4,14 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DExtras">
+<typesystem package="PySide6.Qt3DExtras"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
<namespace-type name="Qt3DExtras">
- <object-type name="QAbstractCameraController" since="5.10">
+ <object-type name="QAbstractCameraController">
<value-type name="InputState"/>
</object-type>
- <object-type name="QAbstractSpriteSheet" since="5.10"/>
+ <object-type name="QAbstractSpriteSheet"/>
<object-type name="QConeGeometry"/>
<object-type name="QConeMesh"/>
<object-type name="QConeGeometryView"/>
@@ -21,7 +22,7 @@
<object-type name="QCylinderGeometryView"/>
<object-type name="QCylinderMesh"/>
<object-type name="QDiffuseMapMaterial"/>
- <object-type name="QDiffuseSpecularMaterial" since="5.10"/>
+ <object-type name="QDiffuseSpecularMaterial"/>
<object-type name="QDiffuseSpecularMapMaterial"/>
<object-type name="QExtrudedTextGeometry"/>
<object-type name="QExtrudedTextMesh"/>
@@ -44,9 +45,9 @@
<object-type name="QSphereGeometry"/>
<object-type name="QSphereGeometryView"/>
<object-type name="QSphereMesh"/>
- <object-type name="QSpriteGrid" since="5.10"/>
- <object-type name="QSpriteSheet" since="5.10"/>
- <object-type name="QSpriteSheetItem" since="5.10"/>
+ <object-type name="QSpriteGrid"/>
+ <object-type name="QSpriteSheet"/>
+ <object-type name="QSpriteSheetItem"/>
<object-type name="QText2DEntity"/>
<object-type name="QTextureMaterial"/>
<object-type name="QTorusGeometry"/>
diff --git a/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt
index 6a58dc881..c27c27718 100644
--- a/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DInput)
set(Qt3DInput_SRC
diff --git a/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml b/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml
index 271b24b1e..fbdfc5961 100644
--- a/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml
+++ b/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml
@@ -4,13 +4,17 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DInput">
+<typesystem package="PySide6.Qt3DInput"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
<namespace-type name="Qt3DInput">
<object-type name="QAbstractActionInput"/>
<object-type name="QAbstractAxisInput"/>
<object-type name="QAbstractPhysicalDevice"/>
- <object-type name="QAction"/>
+ <object-type name="QAction">
+ <!-- Disambiguate from QtGui/qaction.h -->
+ <include file-name="Qt3DInput/qaction.h" location="global"/>
+ </object-type>
<object-type name="QActionInput"/>
<object-type name="QAnalogAxisInput"/>
<object-type name="QAxis"/>
diff --git a/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt
index 2f4105dfa..b9da0cceb 100644
--- a/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DLogic)
set(Qt3DLogic_SRC
diff --git a/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml b/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml
index eef763e83..60f362534 100644
--- a/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml
+++ b/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml
@@ -4,7 +4,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DLogic">
+<typesystem package="PySide6.Qt3DLogic"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
<namespace-type name="Qt3DLogic">
<object-type name="QFrameAction"/>
diff --git a/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt
index a58a3ab87..72f859305 100644
--- a/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt
+++ b/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt
@@ -1,6 +1,14 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(Qt3DRender)
+set(Qt3DRender_DROPPED_ENTRIES)
+
set(Qt3DRender_SRC
+${Qt3DRender_GEN_DIR}/qsharedpointer_propertyreaderinterface_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qsharedpointer_qtextureimagedata_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qsharedpointer_qtextureimagedatagenerator_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_propertyreaderinterface_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qabstractlight_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qabstractraycaster_wrapper.cpp
@@ -20,6 +28,7 @@ ${Qt3DRender_GEN_DIR}/qt3drender_qclipplane_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qcolormask_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qcomputecommand_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qcullface_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qdebugoverlay_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qdepthrange_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qdepthtest_wrapper.cpp
${Qt3DRender_GEN_DIR}/qt3drender_qdirectionallight_wrapper.cpp
@@ -128,13 +137,16 @@ set(Qt3DRender_include_dirs
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
+
${Qt3DCore_GEN_DIR})
set(Qt3DRender_libraries pyside6
${Qt${QT_MAJOR_VERSION}3DRender_LIBRARIES})
-set(Qt3DRender_deps Qt3DCore QtOpenGL)
+set(Qt3DRender_deps Qt3DCore)
+
+check_qt_opengl("3DRender" Qt3DRender_include_dirs Qt3DRender_deps
+ Qt3DRender_DROPPED_ENTRIES)
create_pyside_module(NAME Qt3DRender
INCLUDE_DIRS Qt3DRender_include_dirs
@@ -142,4 +154,5 @@ create_pyside_module(NAME Qt3DRender
DEPS Qt3DRender_deps
TYPESYSTEM_PATH Qt3DRender_SOURCE_DIR
SOURCES Qt3DRender_SRC
- TYPESYSTEM_NAME ${Qt3DRender_BINARY_DIR}/typesystem_3drender.xml)
+ TYPESYSTEM_NAME ${Qt3DRender_BINARY_DIR}/typesystem_3drender.xml
+ DROPPED_ENTRIES Qt3DRender_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml b/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml
index 3d9a9f2dc..66fd70927 100644
--- a/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml
+++ b/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml
@@ -4,15 +4,24 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.Qt3DRender">
+<typesystem package="PySide6.Qt3DRender"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <!-- PYSIDE-2610: QOpenGLTexture's enums are used -->
+ <?if !no_QtOpenGL?>
+ <load-typesystem name="QtOpenGL/typesystem_opengl.xml" generate="no"/>
+ <?endif?>
+ <smart-pointer-type name="QSharedPointer" type="shared" getter="data"
+ reset-method="reset"
+ instantiations="Qt3DRender::PropertyReaderInterface=Qt3DRender::PropertyReaderInterfacePtr,Qt3DRender::QTextureImageData=Qt3DRender::QTextureImageDataPtr,Qt3DRender::QTextureImageDataGenerator=Qt3DRender::QTextureImageDataGeneratorPtr"/>
<namespace-type name="Qt3DRender">
<enum-type name="API"/>
<object-type name="PropertyReaderInterface"/>
<object-type name="QAbstractLight">
<enum-type name="Type"/>
</object-type>
- <object-type name="QAbstractRayCaster" since="5.11">
+ <object-type name="QAbstractRayCaster">
<enum-type name="RunMode"/>
<enum-type name="FilterMode"/>
</object-type>
@@ -20,15 +29,13 @@
<enum-type name="CubeMapFace"/>
<enum-type name="ComparisonFunction"/>
<enum-type name="ComparisonMode"/>
- <enum-type name="HandleType" since="5.13"/>
+ <enum-type name="HandleType"/>
<enum-type name="Filter"/>
<enum-type name="Status"/>
<enum-type name="Target"/>
<enum-type name="TextureFormat"/>
</object-type>
- <object-type name="QAbstractTextureImage">
- <modify-function signature="QAbstractTextureImage(Qt3DCore::QNode*)" remove="all"/>
- </object-type>
+ <object-type name="QAbstractTextureImage"/>
<object-type name="QAlphaCoverage"/>
<object-type name="QAlphaTest">
<enum-type name="AlphaFunction"/>
@@ -39,7 +46,7 @@
<object-type name="QBlendEquationArguments">
<enum-type name="Blending"/>
</object-type>
- <object-type name="QBlitFramebuffer" since="5.10">
+ <object-type name="QBlitFramebuffer">
<enum-type name="InterpolationMethod"/>
</object-type>
<object-type name="QBufferCapture"/>
@@ -56,11 +63,12 @@
<object-type name="QClipPlane"/>
<object-type name="QColorMask"/>
<object-type name="QComputeCommand">
- <enum-type name="RunType" since="5.13"/>
+ <enum-type name="RunType"/>
</object-type>
<object-type name="QCullFace">
<enum-type name="CullingMode"/>
</object-type>
+ <object-type name="QDebugOverlay"/>
<object-type name="QDepthRange"/>
<object-type name="QDepthTest">
<enum-type name="DepthFunction"/>
@@ -97,7 +105,7 @@
</object-type>
<object-type name="QLevelOfDetailBoundingSphere"/>
<object-type name="QLevelOfDetailSwitch"/>
- <object-type name="QLineWidth" since="5.10"/>
+ <object-type name="QLineWidth"/>
<object-type name="QMaterial"/>
<object-type name="QMemoryBarrier">
<enum-type name="Operation" flags="Operations"/>
@@ -108,7 +116,7 @@
<object-type name="QMultiSampleAntiAliasing"/>
<object-type name="QNoDepthMask"/>
<object-type name="QNoDraw"/>
- <object-type name="QNoPicking" since="5.14"/>
+ <object-type name="QNoPicking"/>
<object-type name="QObjectPicker"/>
<object-type name="QPaintedTextureImage"/>
<object-type name="QParameter"/>
@@ -117,8 +125,8 @@
<enum-type name="Modifiers"/>
</object-type>
<object-type name="QPickingProxy"/>
- <object-type name="QPickLineEvent" since="5.10"/>
- <object-type name="QPickPointEvent" since="5.10"/>
+ <object-type name="QPickLineEvent"/>
+ <object-type name="QPickPointEvent"/>
<object-type name="QPickTriangleEvent"/>
<object-type name="QPickingSettings">
<enum-type name="FaceOrientationPickingMode"/>
@@ -130,19 +138,19 @@
<enum-type name="SizeMode"/>
</object-type>
<object-type name="QPolygonOffset"/>
- <object-type name="QProximityFilter" since="5.10"/>
+ <object-type name="QProximityFilter"/>
<object-type name="QRasterMode">
<enum-type name="RasterMode"/>
<enum-type name="FaceMode"/>
</object-type>
- <object-type name="QRayCaster" since="5.11"/>
- <value-type name="QRayCasterHit" since="5.11">
+ <object-type name="QRayCaster"/>
+ <value-type name="QRayCasterHit">
<enum-type name="HitType"/>
</value-type>
<object-type name="QRenderAspect">
<enum-type name="SubmissionType"/>
</object-type>
- <object-type name="QRenderCapabilities" since="5.15">
+ <object-type name="QRenderCapabilities">
<enum-type name="API"/>
<enum-type name="Profile"/>
</object-type>
@@ -166,9 +174,9 @@
<enum-type name="ComponentType"/>
</object-type>
<object-type name="QScissorTest"/>
- <object-type name="QScreenRayCaster" since="5.11"/>
+ <object-type name="QScreenRayCaster"/>
<object-type name="QSeamlessCubemap"/>
- <object-type name="QSetFence" since="5.13">
+ <object-type name="QSetFence">
<enum-type name="HandleType"/>
</object-type>
<object-type name="QShaderData"/>
@@ -177,12 +185,12 @@
<enum-type name="ShaderType"/>
<enum-type name="Status"/>
</object-type>
- <object-type name="QShaderImage" since="5.14">
+ <object-type name="QShaderImage">
<enum-type name="Access"/>
<enum-type name="ImageFormat"/>
</object-type>
- <object-type name="QShaderProgramBuilder" since="5.10"/>
- <object-type name="QSharedGLTexture" since="5.13"/>
+ <object-type name="QShaderProgramBuilder"/>
+ <object-type name="QSharedGLTexture"/>
<object-type name="QSortPolicy">
<enum-type name="SortType"/>
</object-type>
@@ -219,16 +227,14 @@
<enum-type name="Status"/>
</object-type>
<object-type name="QTextureImageData"/>
- <object-type name="QTextureImageDataGenerator">
- <modify-function signature="QTextureImageDataGenerator()" remove="all"/>
- </object-type>
+ <object-type name="QTextureImageDataGenerator"/>
<object-type name="QTextureLoader"/>
<object-type name="QTextureRectangle"/>
<object-type name="QTextureWrapMode">
<enum-type name="WrapMode"/>
</object-type>
<object-type name="QViewport"/>
- <object-type name="QWaitFence" since="5.13">
+ <object-type name="QWaitFence">
<enum-type name="HandleType"/>
</object-type>
</namespace-type>
diff --git a/sources/pyside6/PySide6/QtAsyncio/__init__.py b/sources/pyside6/PySide6/QtAsyncio/__init__.py
new file mode 100644
index 000000000..4baa8134e
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAsyncio/__init__.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+from .events import (
+ QAsyncioEventLoopPolicy, QAsyncioEventLoop, QAsyncioHandle, QAsyncioTimerHandle
+)
+from .futures import QAsyncioFuture
+from .tasks import QAsyncioTask
+
+import asyncio
+import typing
+
+__all__ = [
+ "QAsyncioEventLoopPolicy", "QAsyncioEventLoop",
+ "QAsyncioHandle", "QAsyncioTimerHandle",
+ "QAsyncioFuture", "QAsyncioTask"
+]
+
+
+def run(coro: typing.Optional[typing.Coroutine] = None,
+ keep_running: bool = True,
+ quit_qapp: bool = True, *,
+ handle_sigint: bool = False,
+ debug: typing.Optional[bool] = None) -> typing.Any:
+ """Run the QtAsyncio event loop."""
+
+ # Event loop policies are expected to be deprecated with Python 3.13, with
+ # subsequent removal in Python 3.15. At that point, part of the current
+ # logic of the QAsyncioEventLoopPolicy constructor will have to be moved
+ # here and/or to a loop factory class (to be provided as an argument to
+ # asyncio.run()), namely setting up the QCoreApplication and the SIGINT
+ # handler.
+ #
+ # More details:
+ # https://discuss.python.org/t/removing-the-asyncio-policy-system-asyncio-set-event-loop-policy-in-python-3-15/37553 # noqa: E501
+ default_policy = asyncio.get_event_loop_policy()
+ asyncio.set_event_loop_policy(
+ QAsyncioEventLoopPolicy(quit_qapp=quit_qapp, handle_sigint=handle_sigint))
+
+ ret = None
+ exc = None
+
+ if keep_running:
+ if coro:
+ asyncio.ensure_future(coro)
+ asyncio.get_event_loop().run_forever()
+ else:
+ if coro:
+ ret = asyncio.run(coro, debug=debug)
+ else:
+ exc = RuntimeError(
+ "QtAsyncio was set to keep running after the coroutine "
+ "finished, but no coroutine was provided.")
+
+ asyncio.set_event_loop_policy(default_policy)
+
+ if ret:
+ return ret
+ if exc:
+ raise exc
diff --git a/sources/pyside6/PySide6/QtAsyncio/events.py b/sources/pyside6/PySide6/QtAsyncio/events.py
new file mode 100644
index 000000000..a29e480b7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAsyncio/events.py
@@ -0,0 +1,609 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+from PySide6.QtCore import (QCoreApplication, QDateTime, QDeadlineTimer,
+ QEventLoop, QObject, QTimer, QThread, Slot)
+
+from . import futures
+from . import tasks
+
+import asyncio
+import collections.abc
+import concurrent.futures
+import contextvars
+import enum
+import os
+import signal
+import socket
+import subprocess
+import typing
+import warnings
+
+__all__ = [
+ "QAsyncioEventLoopPolicy", "QAsyncioEventLoop",
+ "QAsyncioHandle", "QAsyncioTimerHandle",
+]
+
+
+class QAsyncioExecutorWrapper(QObject):
+
+ def __init__(self, func: typing.Callable, *args: typing.Tuple) -> None:
+ super().__init__()
+ self._loop: QEventLoop
+ self._func = func
+ self._args = args
+ self._result = None
+ self._exception = None
+
+ def _cb(self):
+ try:
+ self._result = self._func(*self._args)
+ except BaseException as e:
+ self._exception = e
+ self._loop.exit()
+
+ def do(self):
+ # This creates a new event loop and dispatcher for the thread, if not already created.
+ self._loop = QEventLoop()
+ asyncio.events._set_running_loop(self._loop)
+ QTimer.singleShot(0, self._loop, lambda: self._cb())
+ self._loop.exec()
+ if self._exception is not None:
+ raise self._exception
+ return self._result
+
+ def exit(self):
+ self._loop.exit()
+
+
+class QAsyncioEventLoopPolicy(asyncio.AbstractEventLoopPolicy):
+ def __init__(self,
+ application: typing.Optional[QCoreApplication] = None,
+ quit_qapp: bool = True,
+ handle_sigint: bool = False) -> None:
+ super().__init__()
+ if application is None:
+ if QCoreApplication.instance() is None:
+ application = QCoreApplication()
+ else:
+ application = QCoreApplication.instance()
+ self._application: QCoreApplication = application # type: ignore[assignment]
+ self._quit_qapp = quit_qapp
+ self._event_loop: typing.Optional[asyncio.AbstractEventLoop] = None
+
+ if handle_sigint:
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+
+ def get_event_loop(self) -> asyncio.AbstractEventLoop:
+ if self._event_loop is None:
+ self._event_loop = QAsyncioEventLoop(self._application, quit_qapp=self._quit_qapp)
+ return self._event_loop
+
+ def set_event_loop(self, loop: typing.Optional[asyncio.AbstractEventLoop]) -> None:
+ self._event_loop = loop
+
+ def new_event_loop(self) -> asyncio.AbstractEventLoop:
+ return QAsyncioEventLoop(self._application, quit_qapp=self._quit_qapp)
+
+ def get_child_watcher(self) -> "asyncio.AbstractChildWatcher":
+ raise DeprecationWarning("Child watchers are deprecated since Python 3.12")
+
+ def set_child_watcher(self, watcher: "asyncio.AbstractChildWatcher") -> None:
+ raise DeprecationWarning("Child watchers are deprecated since Python 3.12")
+
+
+class QAsyncioEventLoop(asyncio.BaseEventLoop, QObject):
+ """
+ Implements the asyncio API:
+ https://docs.python.org/3/library/asyncio-eventloop.html
+ """
+
+ class ShutDownThread(QThread):
+ def __init__(self, future: futures.QAsyncioFuture, loop: "QAsyncioEventLoop") -> None:
+ super().__init__()
+ self._future = future
+ self._loop = loop
+ self.started.connect(self.shutdown)
+
+ def run(self) -> None:
+ pass
+
+ def shutdown(self) -> None:
+ try:
+ self._loop._default_executor.shutdown(wait=True)
+ if not self._loop.is_closed():
+ self._loop.call_soon_threadsafe(self._future.set_result, None)
+ except Exception as e:
+ if not self._loop.is_closed():
+ self._loop.call_soon_threadsafe(self._future.set_exception, e)
+
+ def __init__(self,
+ application: QCoreApplication, quit_qapp: bool = True) -> None:
+ asyncio.BaseEventLoop.__init__(self)
+ QObject.__init__(self)
+
+ self._application: QCoreApplication = application
+ self._quit_qapp = quit_qapp
+ self._thread = QThread.currentThread()
+
+ self._closed = False
+
+ self._quit_from_inside = False
+ self._quit_from_outside = False
+
+ self._asyncgens: typing.Set[collections.abc.AsyncGenerator] = set()
+
+ # Starting with Python 3.11, this must be an instance of
+ # ThreadPoolExecutor.
+ self._default_executor = concurrent.futures.ThreadPoolExecutor()
+
+ self._exception_handler: typing.Optional[typing.Callable] = self.default_exception_handler
+ self._task_factory: typing.Optional[typing.Callable] = None
+ self._future_to_complete: typing.Optional[futures.QAsyncioFuture] = None
+
+ self._debug = bool(os.getenv("PYTHONASYNCIODEBUG", False))
+
+ self._application.aboutToQuit.connect(self._about_to_quit_cb)
+
+ # Running and stopping the loop
+
+ def _run_until_complete_cb(self, future: futures.QAsyncioFuture) -> None:
+ if not future.cancelled():
+ if isinstance(future.exception(), (SystemExit, KeyboardInterrupt)):
+ return
+ future.get_loop().stop()
+
+ def run_until_complete(self,
+ future: futures.QAsyncioFuture) -> typing.Any: # type: ignore[override]
+ if self.is_closed():
+ raise RuntimeError("Event loop is closed")
+ if self.is_running():
+ raise RuntimeError("Event loop is already running")
+
+ arg_was_coro = not asyncio.futures.isfuture(future)
+ future = asyncio.tasks.ensure_future(future, loop=self) # type: ignore[assignment]
+ future.add_done_callback(self._run_until_complete_cb)
+ self._future_to_complete = future
+
+ try:
+ self.run_forever()
+ except Exception as e:
+ if arg_was_coro and future.done() and not future.cancelled():
+ future.exception()
+ raise e
+ finally:
+ future.remove_done_callback(self._run_until_complete_cb)
+ if not future.done():
+ raise RuntimeError("Event loop stopped before Future completed")
+
+ return future.result()
+
+ def run_forever(self) -> None:
+ if self.is_closed():
+ raise RuntimeError("Event loop is closed")
+ if self.is_running():
+ raise RuntimeError("Event loop is already running")
+ asyncio.events._set_running_loop(self)
+ self._application.exec()
+ asyncio.events._set_running_loop(None)
+
+ def _about_to_quit_cb(self):
+ if not self._quit_from_inside:
+ self._quit_from_outside = True
+ self.close()
+
+ def stop(self) -> None:
+ if self._future_to_complete is not None:
+ if self._future_to_complete.done():
+ self._future_to_complete = None
+ else:
+ return
+ self._quit_from_inside = True
+ if self._quit_qapp:
+ self._application.quit()
+
+ def is_running(self) -> bool:
+ return self._thread.loopLevel() > 0
+
+ def is_closed(self) -> bool:
+ return self._closed
+
+ def close(self) -> None:
+ if self.is_running() and not self._quit_from_outside:
+ raise RuntimeError("Cannot close a running event loop")
+ if self.is_closed():
+ return
+ if self._default_executor is not None:
+ self._default_executor.shutdown(wait=False)
+ self._closed = True
+
+ async def shutdown_asyncgens(self) -> None:
+ if not len(self._asyncgens):
+ return
+
+ results = await asyncio.tasks.gather(
+ *[asyncgen.aclose() for asyncgen in self._asyncgens],
+ return_exceptions=True)
+
+ for result, asyncgen in zip(results, self._asyncgens):
+ if isinstance(result, Exception):
+ self.call_exception_handler({
+ "message": f"Closing asynchronous generator {asyncgen}"
+ f"raised an exception",
+ "exception": result,
+ "asyncgen": asyncgen})
+
+ self._asyncgens.clear()
+
+ async def shutdown_default_executor(self, # type: ignore[override]
+ timeout: typing.Union[int, float, None] = None) -> None:
+ shutdown_successful = False
+ if timeout is not None:
+ deadline_timer = QDeadlineTimer(int(timeout * 1000))
+ else:
+ deadline_timer = QDeadlineTimer(QDeadlineTimer.Forever)
+
+ if self._default_executor is None:
+ return
+ future = self.create_future()
+ thread = QAsyncioEventLoop.ShutDownThread(future, self)
+ thread.start()
+ try:
+ await future
+ finally:
+ shutdown_successful = thread.wait(deadline_timer)
+
+ if timeout is not None and not shutdown_successful:
+ warnings.warn(
+ f"Could not shutdown the default executor within {timeout} seconds",
+ RuntimeWarning, stacklevel=2)
+ self._default_executor.shutdown(wait=False)
+
+ # Scheduling callbacks
+
+ def _call_soon_impl(self, callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None,
+ is_threadsafe: typing.Optional[bool] = False) -> asyncio.Handle:
+ return self._call_later_impl(0, callback, *args, context=context,
+ is_threadsafe=is_threadsafe)
+
+ def call_soon(self, callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None) -> asyncio.Handle:
+ return self._call_soon_impl(callback, *args, context=context, is_threadsafe=False)
+
+ def call_soon_threadsafe(self, callback: typing.Callable, *args: typing.Any,
+ context:
+ typing.Optional[contextvars.Context] = None) -> asyncio.Handle:
+ if self.is_closed():
+ raise RuntimeError("Event loop is closed")
+ if context is None:
+ context = contextvars.copy_context()
+ return self._call_soon_impl(callback, *args, context=context, is_threadsafe=True)
+
+ def _call_later_impl(self, delay: typing.Union[int, float],
+ callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None,
+ is_threadsafe: typing.Optional[bool] = False) -> asyncio.TimerHandle:
+ if not isinstance(delay, (int, float)):
+ raise TypeError("delay must be an int or float")
+ return self._call_at_impl(self.time() + delay, callback, *args, context=context,
+ is_threadsafe=is_threadsafe)
+
+ def call_later(self, delay: typing.Union[int, float],
+ callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None) -> asyncio.TimerHandle:
+ return self._call_later_impl(delay, callback, *args, context=context, is_threadsafe=False)
+
+ def _call_at_impl(self, when: typing.Union[int, float],
+ callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None,
+ is_threadsafe: typing.Optional[bool] = False) -> asyncio.TimerHandle:
+ if not isinstance(when, (int, float)):
+ raise TypeError("when must be an int or float")
+ return QAsyncioTimerHandle(when, callback, args, self, context, is_threadsafe=is_threadsafe)
+
+ def call_at(self, when: typing.Union[int, float],
+ callback: typing.Callable, *args: typing.Any,
+ context: typing.Optional[contextvars.Context] = None) -> asyncio.TimerHandle:
+ return self._call_at_impl(when, callback, *args, context=context, is_threadsafe=False)
+
+ def time(self) -> float:
+ return QDateTime.currentMSecsSinceEpoch() / 1000
+
+ # Creating Futures and Tasks
+
+ def create_future(self) -> futures.QAsyncioFuture: # type: ignore[override]
+ return futures.QAsyncioFuture(loop=self)
+
+ def create_task(self, # type: ignore[override]
+ coro: typing.Union[collections.abc.Generator, collections.abc.Coroutine],
+ *, name: typing.Optional[str] = None,
+ context: typing.Optional[contextvars.Context] = None) -> tasks.QAsyncioTask:
+ if self._task_factory is None:
+ task = tasks.QAsyncioTask(coro, loop=self, name=name, context=context)
+ else:
+ task = self._task_factory(self, coro, context=context)
+ task.set_name(name)
+
+ return task
+
+ def set_task_factory(self, factory: typing.Optional[typing.Callable]) -> None:
+ if factory is not None and not callable(factory):
+ raise TypeError("The task factory must be a callable or None")
+ self._task_factory = factory
+
+ def get_task_factory(self) -> typing.Optional[typing.Callable]:
+ return self._task_factory
+
+ # Opening network connections
+
+ async def create_connection(
+ self, protocol_factory, host=None, port=None,
+ *, ssl=None, family=0, proto=0,
+ flags=0, sock=None, local_addr=None,
+ server_hostname=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None,
+ happy_eyeballs_delay=None, interleave=None):
+ raise NotImplementedError
+
+ async def create_datagram_endpoint(self, protocol_factory,
+ local_addr=None, remote_addr=None, *,
+ family=0, proto=0, flags=0,
+ reuse_address=None, reuse_port=None,
+ allow_broadcast=None, sock=None):
+ raise NotImplementedError
+
+ async def create_unix_connection(
+ self, protocol_factory, path=None, *,
+ ssl=None, sock=None,
+ server_hostname=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None):
+ raise NotImplementedError
+
+ # Creating network servers
+
+ async def create_server(
+ self, protocol_factory, host=None, port=None,
+ *, family=socket.AF_UNSPEC,
+ flags=socket.AI_PASSIVE, sock=None, backlog=100,
+ ssl=None, reuse_address=None, reuse_port=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None,
+ start_serving=True):
+ raise NotImplementedError
+
+ async def create_unix_server(
+ self, protocol_factory, path=None, *,
+ sock=None, backlog=100, ssl=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None,
+ start_serving=True):
+ raise NotImplementedError
+
+ async def connect_accepted_socket(
+ self, protocol_factory, sock,
+ *, ssl=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None):
+ raise NotImplementedError
+
+ # Transferring files
+
+ async def sendfile(self, transport, file, offset=0, count=None,
+ *, fallback=True):
+ raise NotImplementedError
+
+ # TLS Upgrade
+
+ async def start_tls(self, transport, protocol, sslcontext, *,
+ server_side=False,
+ server_hostname=None,
+ ssl_handshake_timeout=None,
+ ssl_shutdown_timeout=None):
+ raise NotImplementedError
+
+ # Watching file descriptors
+
+ def add_reader(self, fd, callback, *args):
+ raise NotImplementedError
+
+ def remove_reader(self, fd):
+ raise NotImplementedError
+
+ def add_writer(self, fd, callback, *args):
+ raise NotImplementedError
+
+ def remove_writer(self, fd):
+ raise NotImplementedError
+
+ # Working with socket objects directly
+
+ async def sock_recv(self, sock, nbytes):
+ raise NotImplementedError
+
+ async def sock_recv_into(self, sock, buf):
+ raise NotImplementedError
+
+ async def sock_recvfrom(self, sock, bufsize):
+ raise NotImplementedError
+
+ async def sock_recvfrom_into(self, sock, buf, nbytes=0):
+ raise NotImplementedError
+
+ async def sock_sendall(self, sock, data):
+ raise NotImplementedError
+
+ async def sock_sendto(self, sock, data, address):
+ raise NotImplementedError
+
+ async def sock_connect(self, sock, address):
+ raise NotImplementedError
+
+ async def sock_accept(self, sock):
+ raise NotImplementedError
+
+ async def sock_sendfile(self, sock, file, offset=0, count=None, *,
+ fallback=None):
+ raise NotImplementedError
+
+ # DNS
+
+ async def getaddrinfo(self, host, port, *,
+ family=0, type=0, proto=0, flags=0):
+ raise NotImplementedError
+
+ async def getnameinfo(self, sockaddr, flags=0):
+ raise NotImplementedError
+
+ # Working with pipes
+
+ async def connect_read_pipe(self, protocol_factory, pipe):
+ raise NotImplementedError
+
+ async def connect_write_pipe(self, protocol_factory, pipe):
+ raise NotImplementedError
+
+ # Unix signals
+
+ def add_signal_handler(self, sig, callback, *args):
+ raise NotImplementedError
+
+ def remove_signal_handler(self, sig):
+ raise NotImplementedError
+
+ # Executing code in thread or process pools
+
+ def run_in_executor(self,
+ executor: typing.Optional[concurrent.futures.ThreadPoolExecutor],
+ func: typing.Callable, *args: typing.Tuple) -> asyncio.futures.Future:
+ if self.is_closed():
+ raise RuntimeError("Event loop is closed")
+ if executor is None:
+ executor = self._default_executor
+ wrapper = QAsyncioExecutorWrapper(func, *args)
+ return asyncio.futures.wrap_future(
+ executor.submit(wrapper.do), loop=self
+ )
+
+ def set_default_executor(self,
+ executor: typing.Optional[
+ concurrent.futures.ThreadPoolExecutor]) -> None:
+ if not isinstance(executor, concurrent.futures.ThreadPoolExecutor):
+ raise TypeError("The executor must be a ThreadPoolExecutor")
+ self._default_executor = executor
+
+ # Error Handling API
+
+ def set_exception_handler(self, handler: typing.Optional[typing.Callable]) -> None:
+ if handler is not None and not callable(handler):
+ raise TypeError("The handler must be a callable or None")
+ self._exception_handler = handler
+
+ def get_exception_handler(self) -> typing.Optional[typing.Callable]:
+ return self._exception_handler
+
+ def default_exception_handler(self, context: typing.Dict[str, typing.Any]) -> None:
+ # TODO
+ if context["message"]:
+ print(context["message"])
+
+ def call_exception_handler(self, context: typing.Dict[str, typing.Any]) -> None:
+ if self._exception_handler is not None:
+ self._exception_handler(context)
+
+ # Enabling debug mode
+
+ def get_debug(self) -> bool:
+ # TODO: Part of the asyncio API but currently unused. More details:
+ # https://docs.python.org/3/library/asyncio-dev.html#asyncio-debug-mode
+ return self._debug
+
+ def set_debug(self, enabled: bool) -> None:
+ self._debug = enabled
+
+ # Running subprocesses
+
+ async def subprocess_exec(self, protocol_factory, *args,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ **kwargs):
+ raise NotImplementedError
+
+ async def subprocess_shell(self, protocol_factory, cmd, *,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ **kwargs):
+ raise NotImplementedError
+
+
+class QAsyncioHandle():
+ class HandleState(enum.Enum):
+ PENDING = enum.auto()
+ CANCELLED = enum.auto()
+ DONE = enum.auto()
+
+ def __init__(self, callback: typing.Callable, args: typing.Tuple,
+ loop: QAsyncioEventLoop, context: typing.Optional[contextvars.Context],
+ is_threadsafe: typing.Optional[bool] = False) -> None:
+ self._callback = callback
+ self._args = args
+ self._loop = loop
+ self._context = context
+ self._is_threadsafe = is_threadsafe
+
+ self._timeout = 0
+
+ self._state = QAsyncioHandle.HandleState.PENDING
+ self._start()
+
+ def _schedule_event(self, timeout: int, func: typing.Callable) -> None:
+ if not self._loop.is_closed() and not self._loop._quit_from_outside:
+ if self._is_threadsafe:
+ QTimer.singleShot(timeout, self._loop, func)
+ else:
+ QTimer.singleShot(timeout, func)
+
+ def _start(self) -> None:
+ self._schedule_event(self._timeout, lambda: self._cb())
+
+ @Slot()
+ def _cb(self) -> None:
+ if self._state == QAsyncioHandle.HandleState.PENDING:
+ if self._context is not None:
+ self._context.run(self._callback, *self._args)
+ else:
+ self._callback(*self._args)
+ self._state = QAsyncioHandle.HandleState.DONE
+
+ def cancel(self) -> None:
+ if self._state == QAsyncioHandle.HandleState.PENDING:
+ # The old timer that was created in _start will still trigger but _cb won't do anything.
+ self._state = QAsyncioHandle.HandleState.CANCELLED
+
+ def cancelled(self) -> bool:
+ return self._state == QAsyncioHandle.HandleState.CANCELLED
+
+
+class QAsyncioTimerHandle(QAsyncioHandle, asyncio.TimerHandle):
+ def __init__(self, when: float, callback: typing.Callable, args: typing.Tuple,
+ loop: QAsyncioEventLoop, context: typing.Optional[contextvars.Context],
+ is_threadsafe: typing.Optional[bool] = False) -> None:
+ QAsyncioHandle.__init__(self, callback, args, loop, context, is_threadsafe)
+
+ self._when = when
+ time = self._loop.time()
+ self._timeout = round(max(self._when - time, 0) * 1000)
+
+ QAsyncioHandle._start(self)
+
+ # Override this so that timer.start() is only called once at the end
+ # of the constructor for both QtHandle and QtTimerHandle.
+ def _start(self) -> None:
+ pass
+
+ def when(self) -> float:
+ return self._when
diff --git a/sources/pyside6/PySide6/QtAsyncio/futures.py b/sources/pyside6/PySide6/QtAsyncio/futures.py
new file mode 100644
index 000000000..611bd5634
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAsyncio/futures.py
@@ -0,0 +1,115 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+from . import events
+
+import asyncio
+import contextvars
+import enum
+import typing
+
+
+class QAsyncioFuture():
+ """ https://docs.python.org/3/library/asyncio-future.html """
+
+ # Declare that this class implements the Future protocol. The field must
+ # exist and be boolean - True indicates 'await' or 'yield from', False
+ # indicates 'yield'.
+ _asyncio_future_blocking = False
+
+ class FutureState(enum.Enum):
+ PENDING = enum.auto()
+ CANCELLED = enum.auto()
+ DONE_WITH_RESULT = enum.auto()
+ DONE_WITH_EXCEPTION = enum.auto()
+
+ def __init__(self, *, loop: typing.Optional["events.QAsyncioEventLoop"] = None,
+ context: typing.Optional[contextvars.Context] = None) -> None:
+ self._loop: "events.QAsyncioEventLoop"
+ if loop is None:
+ self._loop = asyncio.events.get_event_loop() # type: ignore[assignment]
+ else:
+ self._loop = loop
+ self._context = context
+
+ self._state = QAsyncioFuture.FutureState.PENDING
+ self._result: typing.Any = None
+ self._exception: typing.Optional[BaseException] = None
+
+ self._callbacks: typing.List[typing.Callable] = list()
+
+ self._cancel_message: typing.Optional[str] = None
+
+ def __await__(self):
+ if not self.done():
+ self._asyncio_future_blocking = True
+ yield self
+ if not self.done():
+ raise RuntimeError("await was not used with a Future or Future-like object")
+ return self.result()
+
+ __iter__ = __await__
+
+ def _schedule_callbacks(self, context: typing.Optional[contextvars.Context] = None):
+ for cb in self._callbacks:
+ self._loop.call_soon(
+ cb, self, context=context if context else self._context)
+
+ def result(self) -> typing.Union[typing.Any, Exception]:
+ if self._state == QAsyncioFuture.FutureState.DONE_WITH_RESULT:
+ return self._result
+ if self._state == QAsyncioFuture.FutureState.DONE_WITH_EXCEPTION and self._exception:
+ raise self._exception
+ if self._state == QAsyncioFuture.FutureState.CANCELLED:
+ if self._cancel_message:
+ raise asyncio.CancelledError(self._cancel_message)
+ else:
+ raise asyncio.CancelledError
+ raise asyncio.InvalidStateError
+
+ def set_result(self, result: typing.Any) -> None:
+ self._result = result
+ self._state = QAsyncioFuture.FutureState.DONE_WITH_RESULT
+ self._schedule_callbacks()
+
+ def set_exception(self, exception: Exception) -> None:
+ self._exception = exception
+ self._state = QAsyncioFuture.FutureState.DONE_WITH_EXCEPTION
+ self._schedule_callbacks()
+
+ def done(self) -> bool:
+ return self._state != QAsyncioFuture.FutureState.PENDING
+
+ def cancelled(self) -> bool:
+ return self._state == QAsyncioFuture.FutureState.CANCELLED
+
+ def add_done_callback(self, cb: typing.Callable, *,
+ context: typing.Optional[contextvars.Context] = None) -> None:
+ if self.done():
+ self._loop.call_soon(
+ cb, self, context=context if context else self._context)
+ else:
+ self._callbacks.append(cb)
+
+ def remove_done_callback(self, cb: typing.Callable) -> int:
+ original_len = len(self._callbacks)
+ self._callbacks = [_cb for _cb in self._callbacks if _cb != cb]
+ return original_len - len(self._callbacks)
+
+ def cancel(self, msg: typing.Optional[str] = None) -> bool:
+ if self.done():
+ return False
+ self._state = QAsyncioFuture.FutureState.CANCELLED
+ self._cancel_message = msg
+ self._schedule_callbacks()
+ return True
+
+ def exception(self) -> typing.Optional[BaseException]:
+ if self._state == QAsyncioFuture.FutureState.CANCELLED:
+ raise asyncio.CancelledError
+ if self.done():
+ return self._exception
+ raise asyncio.InvalidStateError
+
+ def get_loop(self) -> asyncio.AbstractEventLoop:
+ return self._loop
diff --git a/sources/pyside6/PySide6/QtAsyncio/tasks.py b/sources/pyside6/PySide6/QtAsyncio/tasks.py
new file mode 100644
index 000000000..c04006686
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAsyncio/tasks.py
@@ -0,0 +1,157 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+from . import events
+from . import futures
+
+import asyncio
+import collections.abc
+import concurrent.futures
+import contextvars
+import typing
+
+
+class QAsyncioTask(futures.QAsyncioFuture):
+ """ https://docs.python.org/3/library/asyncio-task.html """
+
+ def __init__(self, coro: typing.Union[collections.abc.Generator, collections.abc.Coroutine], *,
+ loop: typing.Optional["events.QAsyncioEventLoop"] = None,
+ name: typing.Optional[str] = None,
+ context: typing.Optional[contextvars.Context] = None) -> None:
+ super().__init__(loop=loop, context=context)
+
+ self._coro = coro
+ self._name = name if name else "QtTask"
+
+ self._handle = self._loop.call_soon(self._step, context=self._context)
+
+ self._cancellation_requests = 0
+
+ self._future_to_await: typing.Optional[asyncio.Future] = None
+ self._cancel_message: typing.Optional[str] = None
+ self._cancelled = False
+
+ asyncio._register_task(self) # type: ignore[arg-type]
+
+ def __repr__(self) -> str:
+ if self._state == futures.QAsyncioFuture.FutureState.PENDING:
+ state = "Pending"
+ elif self._state == futures.QAsyncioFuture.FutureState.DONE_WITH_RESULT:
+ state = "Done"
+ elif self._state == futures.QAsyncioFuture.FutureState.DONE_WITH_EXCEPTION:
+ state = f"Done with exception ({repr(self._exception)})"
+ elif self._state == futures.QAsyncioFuture.FutureState.CANCELLED:
+ state = "Cancelled"
+
+ return f"Task '{self.get_name()}' with state: {state}"
+
+ class QtTaskApiMisuseError(Exception):
+ pass
+
+ def set_result(self, result: typing.Any) -> None: # type: ignore[override]
+ # This function is not inherited from the Future APIs.
+ raise QAsyncioTask.QtTaskApiMisuseError("Tasks cannot set results")
+
+ def set_exception(self, exception: typing.Any) -> None: # type: ignore[override]
+ # This function is not inherited from the Future APIs.
+ raise QAsyncioTask.QtTaskApiMisuseError("Tasks cannot set exceptions")
+
+ def _step(self,
+ exception_or_future: typing.Union[
+ BaseException, futures.QAsyncioFuture, None] = None) -> None:
+ if self.done():
+ return
+ result = None
+ self._future_to_await = None
+
+ if asyncio.futures.isfuture(exception_or_future):
+ try:
+ exception_or_future.result()
+ except BaseException as e:
+ exception_or_future = e
+
+ try:
+ asyncio._enter_task(self._loop, self) # type: ignore[arg-type]
+ if isinstance(exception_or_future, BaseException):
+ result = self._coro.throw(exception_or_future)
+ else:
+ result = self._coro.send(None)
+ except StopIteration as e:
+ self._state = futures.QAsyncioFuture.FutureState.DONE_WITH_RESULT
+ self._result = e.value
+ except (concurrent.futures.CancelledError, asyncio.exceptions.CancelledError) as e:
+ self._state = futures.QAsyncioFuture.FutureState.CANCELLED
+ self._exception = e
+ except BaseException as e:
+ self._state = futures.QAsyncioFuture.FutureState.DONE_WITH_EXCEPTION
+ self._exception = e
+ else:
+ if asyncio.futures.isfuture(result):
+ result.add_done_callback(
+ self._step, context=self._context) # type: ignore[arg-type]
+ self._future_to_await = result
+ if self._cancelled:
+ # If the task was cancelled, then a new future should be
+ # cancelled as well. Otherwise, in some scenarios like
+ # a loop inside the task and with bad timing, if the new
+ # future is not cancelled, the task would continue running
+ # in this loop despite having been cancelled. This bad
+ # timing can occur especially if the first future finishes
+ # very quickly.
+ self._future_to_await.cancel(self._cancel_message)
+ elif result is None:
+ self._loop.call_soon(self._step, context=self._context)
+ else:
+ exception = RuntimeError(f"Bad task result: {result}")
+ self._loop.call_soon(self._step, exception, context=self._context)
+ finally:
+ asyncio._leave_task(self._loop, self) # type: ignore[arg-type]
+ if self._exception:
+ self._loop.call_exception_handler({
+ "message": (str(self._exception) if self._exception
+ else "An exception occurred during task "
+ "execution"),
+ "exception": self._exception,
+ "task": self,
+ "future": (exception_or_future
+ if asyncio.futures.isfuture(exception_or_future)
+ else None)
+ })
+ if self.done():
+ self._schedule_callbacks()
+ asyncio._unregister_task(self) # type: ignore[arg-type]
+
+ def get_stack(self, *, limit=None) -> typing.List[typing.Any]:
+ # TODO
+ raise NotImplementedError("QtTask.get_stack is not implemented")
+
+ def print_stack(self, *, limit=None, file=None) -> None:
+ # TODO
+ raise NotImplementedError("QtTask.print_stack is not implemented")
+
+ def get_coro(self) -> typing.Union[collections.abc.Generator, collections.abc.Coroutine]:
+ return self._coro
+
+ def get_name(self) -> str:
+ return self._name
+
+ def set_name(self, value) -> None:
+ self._name = str(value)
+
+ def cancel(self, msg: typing.Optional[str] = None) -> bool:
+ if self.done():
+ return False
+ self._cancel_message = msg
+ self._handle.cancel()
+ if self._future_to_await is not None:
+ self._future_to_await.cancel(msg)
+ self._cancelled = True
+ return True
+
+ def uncancel(self) -> None:
+ # TODO
+ raise NotImplementedError("QtTask.uncancel is not implemented")
+
+ def cancelling(self) -> bool:
+ # TODO
+ raise NotImplementedError("QtTask.cancelling is not implemented")
diff --git a/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt b/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt
index 7b804385c..3857d8ddb 100644
--- a/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtAxContainer)
set(QtAxContainer_SRC
diff --git a/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml b/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml
index 4c570f87a..4d1cbe91c 100644
--- a/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml
+++ b/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml
@@ -4,7 +4,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtAxContainer">
+<typesystem package="PySide6.QtAxContainer"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<rejection class="*" function-name="connectNotify"/>
<rejection class="*" function-name="queryInterface"/>
diff --git a/sources/pyside6/PySide6/QtBluetooth/CMakeLists.txt b/sources/pyside6/PySide6/QtBluetooth/CMakeLists.txt
index 495ec16a5..e063a4546 100644
--- a/sources/pyside6/PySide6/QtBluetooth/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtBluetooth/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtBluetooth)
set(QtBluetooth_OPTIONAL_SRC )
diff --git a/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml b/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml
index ffa513a24..a3687b6b0 100644
--- a/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml
+++ b/sources/pyside6/PySide6/QtBluetooth/typesystem_bluetooth.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtBluetooth">
+<typesystem package="PySide6.QtBluetooth"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<namespace-type name="QBluetooth">
<enum-type name="AttAccessConstraint" flags="AttAccessConstraints"/>
@@ -17,7 +18,7 @@
<enum-type name="Pairing"/>
</object-type>
<object-type name="QBluetoothDeviceDiscoveryAgent">
- <enum-type name="DiscoveryMethod"/>
+ <enum-type name="DiscoveryMethod" flags="DiscoveryMethods"/>
<enum-type name="Error"/>
</object-type>
<value-type name="QBluetoothDeviceInfo">
@@ -58,6 +59,28 @@
<enum-type name="DescriptorType"/>
<enum-type name="ProtocolUuid"/>
<enum-type name="ServiceClassUuid"/>
+ <modify-function signature="toUInt16(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toUInt32(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
</value-type>
<value-type name="QLowEnergyAdvertisingData">
<enum-type name="Discoverability"/>
@@ -90,4 +113,8 @@
<value-type name="QLowEnergyServiceData">
<enum-type name="ServiceType"/>
</value-type>
+
+ <!-- QtNetwork is pulled in via QtBluetoothDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtCharts/CMakeLists.txt b/sources/pyside6/PySide6/QtCharts/CMakeLists.txt
index 94c39f656..20126fdee 100644
--- a/sources/pyside6/PySide6/QtCharts/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtCharts/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtCharts)
set(QtCharts_SRC
@@ -22,6 +25,7 @@ ${QtCharts_GEN_DIR}/qcandlestickset_wrapper.cpp
${QtCharts_GEN_DIR}/qcategoryaxis_wrapper.cpp
${QtCharts_GEN_DIR}/qchart_wrapper.cpp
${QtCharts_GEN_DIR}/qchartview_wrapper.cpp
+${QtCharts_GEN_DIR}/qcoloraxis_wrapper.cpp
${QtCharts_GEN_DIR}/qdatetimeaxis_wrapper.cpp
${QtCharts_GEN_DIR}/qhbarmodelmapper_wrapper.cpp
${QtCharts_GEN_DIR}/qhboxplotmodelmapper_wrapper.cpp
@@ -69,10 +73,7 @@ set(QtCharts_include_dirs ${QtCharts_SOURCE_DIR}
${QtWidgets_GEN_DIR})
set(QtCharts_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Charts_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}Charts_LIBRARIES})
set(QtCharts_deps QtCore QtGui QtWidgets)
diff --git a/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml b/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml
index 958f00c77..d4337df8e 100644
--- a/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml
+++ b/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtCharts">
+<typesystem package="PySide6.QtCharts"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<!-- PYSIDE-1101 Removing inherited method to avoid argument conflict
on the QChart::scroll overload -->
@@ -80,7 +81,7 @@
</modify-function>
</object-type>
<object-type name="QBoxSet">
- <enum-type name="ValuePositions"/>
+ <enum-type name="ValuePositions" python-type="IntEnum"/>
</object-type>
<object-type name="QCandlestickLegendMarker"/>
<object-type name="QCandlestickModelMapper"/>
@@ -160,6 +161,7 @@
</modify-argument>
</modify-function>
</object-type>
+ <object-type name="QColorAxis"/>
<object-type name="QDateTimeAxis"/>
<object-type name="QHBarModelMapper"/>
<object-type name="QHBoxPlotModelMapper"/>
diff --git a/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt b/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt
index b38849a75..134e44ed9 100644
--- a/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtConcurrent)
set(QtConcurrent_SRC
@@ -15,12 +18,11 @@ set(QtConcurrent_include_dirs ${QtConcurrent_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Concurrent_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtConcurrent_libraries pyside6
- ${QtConcurrent_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
+ ${QtCore_GEN_DIR})
+
+set(QtConcurrent_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Concurrent_LIBRARIES})
+
set(QtConcurrent_deps QtCore)
create_pyside_module(NAME QtConcurrent
diff --git a/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml b/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml
index c1e6cafad..1892793b9 100644
--- a/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml
+++ b/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml
@@ -3,13 +3,14 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtConcurrent">
+<typesystem package="PySide6.QtConcurrent"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<!-- Qt5: this is currently the minimum possible QtConcurrent support, by just extracting
the name space from QtCore -->
<namespace-type name="QtConcurrent" target-type="class">
- <rejection class="QtConcurrent" enum-name="enum_1"/>
+ <enum-type name="FutureResult"/>
<enum-type name="ReduceOption" flags="ReduceOptions"/>
<enum-type name="ThreadFunctionResult"/>
<extra-includes>
@@ -20,7 +21,6 @@
<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"/>
diff --git a/sources/pyside6/PySide6/QtCore/CMakeLists.txt b/sources/pyside6/PySide6/QtCore/CMakeLists.txt
index 5cb3a0ad5..f3e4be0f9 100644
--- a/sources/pyside6/PySide6/QtCore/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtCore/CMakeLists.txt
@@ -1,9 +1,18 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtCore)
+set(CMAKE_AUTOMOC ON)
+
+set(QtCore_DROPPED_ENTRIES )
+
set(QtCore_static_sources
"${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp"
"${QtCore_SOURCE_DIR}/glue/core_snippets.cpp"
"${QtCore_SOURCE_DIR}/glue/qtcorehelper.cpp"
+ "${QtCore_SOURCE_DIR}/glue/qiopipe.cpp"
+ "${pyside6_SOURCE_DIR}/qiopipe.h"
)
if(ENABLE_WIN)
@@ -11,7 +20,8 @@ if(ENABLE_WIN)
${QtCore_GEN_DIR}/qwineventnotifier_wrapper.cpp
)
else()
- set(SPECIFIC_OS_FILES "")
+ set(SPECIFIC_OS_FILES
+ ${QtCore_GEN_DIR}/qprocess_unixprocessparameters_wrapper.cpp)
endif()
set(QtCore_SRC
@@ -31,8 +41,8 @@ ${QtCore_GEN_DIR}/qbuffer_wrapper.cpp
${QtCore_GEN_DIR}/qbytearray_frombase64result_wrapper.cpp
${QtCore_GEN_DIR}/qbytearray_wrapper.cpp
${QtCore_GEN_DIR}/qbytearraymatcher_wrapper.cpp
-${QtCore_GEN_DIR}/qcalendar_wrapper.cpp
${QtCore_GEN_DIR}/qcalendar_systemid_wrapper.cpp
+${QtCore_GEN_DIR}/qcalendar_wrapper.cpp
${QtCore_GEN_DIR}/qcalendar_yearmonthday_wrapper.cpp
${QtCore_GEN_DIR}/qcborarray_wrapper.cpp
${QtCore_GEN_DIR}/qcborerror_wrapper.cpp
@@ -71,6 +81,7 @@ ${QtCore_GEN_DIR}/qfilesystemwatcher_wrapper.cpp
${QtCore_GEN_DIR}/qfutureinterfacebase_wrapper.cpp
${QtCore_GEN_DIR}/qgenericargument_wrapper.cpp
${QtCore_GEN_DIR}/qgenericreturnargument_wrapper.cpp
+${QtCore_GEN_DIR}/qhashseed_wrapper.cpp
${QtCore_GEN_DIR}/qidentityproxymodel_wrapper.cpp
${QtCore_GEN_DIR}/qiodevice_wrapper.cpp
${QtCore_GEN_DIR}/qiodevicebase_wrapper.cpp
@@ -88,6 +99,7 @@ ${QtCore_GEN_DIR}/qline_wrapper.cpp
${QtCore_GEN_DIR}/qlinef_wrapper.cpp
${QtCore_GEN_DIR}/qlocale_wrapper.cpp
${QtCore_GEN_DIR}/qlockfile_wrapper.cpp
+${QtCore_GEN_DIR}/qloggingcategory_wrapper.cpp
${QtCore_GEN_DIR}/qmargins_wrapper.cpp
${QtCore_GEN_DIR}/qmarginsf_wrapper.cpp
${QtCore_GEN_DIR}/qmessageauthenticationcode_wrapper.cpp
@@ -105,8 +117,10 @@ ${QtCore_GEN_DIR}/qmimetype_wrapper.cpp
${QtCore_GEN_DIR}/qmodelindex_wrapper.cpp
${QtCore_GEN_DIR}/qmodelroledata_wrapper.cpp
${QtCore_GEN_DIR}/qmutex_wrapper.cpp
+${QtCore_GEN_DIR}/qnativeipckey_wrapper.cpp
${QtCore_GEN_DIR}/qobject_wrapper.cpp
${QtCore_GEN_DIR}/qoperatingsystemversion_wrapper.cpp
+${QtCore_GEN_DIR}/qoperatingsystemversionbase_wrapper.cpp
${QtCore_GEN_DIR}/qparallelanimationgroup_wrapper.cpp
${QtCore_GEN_DIR}/qpauseanimation_wrapper.cpp
${QtCore_GEN_DIR}/qpersistentmodelindex_wrapper.cpp
@@ -133,7 +147,6 @@ ${QtCore_GEN_DIR}/qsemaphore_wrapper.cpp
${QtCore_GEN_DIR}/qsemaphorereleaser_wrapper.cpp
${QtCore_GEN_DIR}/qsequentialanimationgroup_wrapper.cpp
${QtCore_GEN_DIR}/qsettings_wrapper.cpp
-${QtCore_GEN_DIR}/qsharedmemory_wrapper.cpp
${QtCore_GEN_DIR}/qsignalblocker_wrapper.cpp
${QtCore_GEN_DIR}/qsignalmapper_wrapper.cpp
${QtCore_GEN_DIR}/qsize_wrapper.cpp
@@ -143,17 +156,18 @@ ${QtCore_GEN_DIR}/qsocketnotifier_wrapper.cpp
${QtCore_GEN_DIR}/qsortfilterproxymodel_wrapper.cpp
${QtCore_GEN_DIR}/qstandardpaths_wrapper.cpp
${QtCore_GEN_DIR}/qstorageinfo_wrapper.cpp
-${QtCore_GEN_DIR}/qstringconverterbase_wrapper.cpp
-${QtCore_GEN_DIR}/qstringconverterbase_state_wrapper.cpp
${QtCore_GEN_DIR}/qstringconverter_wrapper.cpp
-${QtCore_GEN_DIR}/qstringencoder_wrapper.cpp
+${QtCore_GEN_DIR}/qstringconverterbase_state_wrapper.cpp
+${QtCore_GEN_DIR}/qstringconverterbase_wrapper.cpp
${QtCore_GEN_DIR}/qstringdecoder_wrapper.cpp
+${QtCore_GEN_DIR}/qstringencoder_wrapper.cpp
${QtCore_GEN_DIR}/qstringlistmodel_wrapper.cpp
${QtCore_GEN_DIR}/qsysinfo_wrapper.cpp
${QtCore_GEN_DIR}/qsystemsemaphore_wrapper.cpp
${QtCore_GEN_DIR}/qt_wrapper.cpp
${QtCore_GEN_DIR}/qtcorehelper_qgenericargumentholder_wrapper.cpp
${QtCore_GEN_DIR}/qtcorehelper_qgenericreturnargumentholder_wrapper.cpp
+${QtCore_GEN_DIR}/qtcorehelper_qiopipe_wrapper.cpp
${QtCore_GEN_DIR}/qtcorehelper_qmutexlocker_wrapper.cpp
${QtCore_GEN_DIR}/qtemporarydir_wrapper.cpp
${QtCore_GEN_DIR}/qtemporaryfile_wrapper.cpp
@@ -185,16 +199,36 @@ ${QtCore_GEN_DIR}/qxmlstreamnamespacedeclaration_wrapper.cpp
${QtCore_GEN_DIR}/qxmlstreamnotationdeclaration_wrapper.cpp
${QtCore_GEN_DIR}/qxmlstreamreader_wrapper.cpp
${QtCore_GEN_DIR}/qxmlstreamwriter_wrapper.cpp
-${QtCore_GEN_DIR}/qloggingcategory_wrapper.cpp
${SPECIFIC_OS_FILES}
# module is always needed
${QtCore_GEN_DIR}/qtcore_module_wrapper.cpp
)
-if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_EQUAL 6.3.0 OR Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 6.3.0)
+get_property(QtCore_disabled_features TARGET Qt${QT_MAJOR_VERSION}::Core
+ PROPERTY QT_DISABLED_PUBLIC_FEATURES)
+
+if("permissions" IN_LIST QtCore_disabled_features)
+ list(APPEND QtCore_DROPPED_ENTRIES QPermission
+ QBluetoothPermission QCalendarPermission QCameraPermission
+ QContactsPermission QLocationPermission QMicrophonePermission)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Core: Dropping Permissions classes")
+else()
list(APPEND QtCore_SRC
- ${QtCore_GEN_DIR}/qoperatingsystemversionbase_wrapper.cpp)
+ ${QtCore_GEN_DIR}/qbluetoothpermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qcalendarpermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qcamerapermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qcontactspermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qlocationpermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qmicrophonepermission_wrapper.cpp
+ ${QtCore_GEN_DIR}/qpermission_wrapper.cpp)
+endif()
+
+if("sharedmemory" IN_LIST QtCore_disabled_features)
+ list(APPEND QtCore_DROPPED_ENTRIES QSharedMemory)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Core: Dropping QSharedMemory")
+else()
+ list(APPEND QtCore_SRC ${QtCore_GEN_DIR}/qsharedmemory_wrapper.cpp)
endif()
configure_file("${QtCore_SOURCE_DIR}/QtCore_global.post.h.in"
@@ -213,6 +247,7 @@ set(QtCore_include_dirs ${QtCore_SOURCE_DIR}
)
set(QtCore_libraries pyside6
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ Qt::CorePrivate
)
create_pyside_module(NAME QtCore
@@ -223,6 +258,34 @@ create_pyside_module(NAME QtCore
STATIC_SOURCES QtCore_static_sources
TYPESYSTEM_NAME ${QtCore_BINARY_DIR}/typesystem_core.xml
GLUE_SOURCES QtCore_glue_sources
+ DROPPED_ENTRIES QtCore_DROPPED_ENTRIES
)
-install(FILES ${pyside6_SOURCE_DIR}/qtcorehelper.h DESTINATION include/PySide6/QtCore/)
+# Note: The permission API for Apple platforms only works if the Python application is packaged
+# with pyside6-deploy (uses Nuitka). Read "Notes for Developers" in Qt for Python documentation
+# for more information
+#
+# For Apple platforms, the Qt permission API implementations are in small static libraries.
+# In Qt C++, the application is linked directly to these static libraries during the build when
+# linking to the QtCore module as a post processing CMake step.
+# Being static plugins makes it difficult to add these plugins during Nuitka packaging step.
+# Thus, we link the static plugins to QtCore.abi3.so. However, to request the permissions
+# it is still required to have the necessary Information Property keys eg: NSCameraUsageDescription
+# in the Info.plist of the application bundle which Nuitka creates.
+if (APPLE)
+ set(permissions Camera Microphone Bluetooth Contacts Calendar)
+ foreach(permission IN LISTS permissions)
+ set(permission_plugin_name "QDarwin${permission}PermissionPlugin")
+ set(permission_plugin "${QT_CMAKE_EXPORT_NAMESPACE}::${permission_plugin_name}")
+ # Setting this property is necessary for Camera and Microphone. Otherwise it won't append
+ # the linker flags like -Wl,-u,_QDarwinMicrophonePermissionRequest which are required to
+ # link to qdarwinpermissionplugin_microphone_request.mm.o and find symbols like
+ # QDarwinMicrosphonePermissionHandler which handles requesting the actual permission
+ set_target_properties(QtCore PROPERTIES "_qt_has_${permission_plugin_name}_usage_description" TRUE)
+ # importing the plugin
+ qt6_import_plugins(QtCore INCLUDE ${permission_plugin})
+ endforeach()
+endif()
+
+install(FILES ${pyside6_SOURCE_DIR}/qtcorehelper.h ${pyside6_SOURCE_DIR}/qiopipe.h
+ DESTINATION include/PySide6/QtCore/)
diff --git a/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in b/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in
index 55a49bb88..8383b9ae4 100644
--- a/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in
+++ b/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in
@@ -1 +1,2 @@
#include <qtcorehelper.h>
+#include <qiopipe.h>
diff --git a/sources/pyside6/PySide6/QtCore/glue/core_snippets.cpp b/sources/pyside6/PySide6/QtCore/glue/core_snippets.cpp
index 4978387ff..4266e868c 100644
--- a/sources/pyside6/PySide6/QtCore/glue/core_snippets.cpp
+++ b/sources/pyside6/PySide6/QtCore/glue/core_snippets.cpp
@@ -2,11 +2,16 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "core_snippets_p.h"
+#include "qtcorehelper.h"
#include "pysideqobject.h"
#include "shiboken.h"
+#ifndef Py_LIMITED_API
+# include <datetime.h>
+#endif
#include "basewrapper.h"
#include "autodecref.h"
+#include "pysideutils.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
@@ -62,7 +67,8 @@ QVariant QVariant_convertToValueList(PyObject *list)
Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
- QMetaType metaType = QVariant_resolveMetaType(element.cast<PyTypeObject *>());
+ auto *type = reinterpret_cast<PyTypeObject *>(element.object());
+ QMetaType metaType = QVariant_resolveMetaType(type);
if (!metaType.isValid())
return {};
@@ -237,3 +243,106 @@ QString qObjectTr(PyTypeObject *type, const char *sourceText, const char *disamb
}
return result;
}
+
+bool PyDate_ImportAndCheck(PyObject *pyIn)
+{
+ if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
+ return PyDate_Check(pyIn);
+}
+
+bool PyDateTime_ImportAndCheck(PyObject *pyIn)
+{
+ if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
+ return PyDateTime_Check(pyIn);
+}
+
+bool PyTime_ImportAndCheck(PyObject *pyIn)
+{
+ if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
+ return PyTime_Check(pyIn);
+}
+
+PyObject *invokeMetaMethod(const InvokeMetaMethodFunc &f,
+ const QtCoreHelper::QGenericArgumentHolder &a0,
+ const QtCoreHelper::QGenericArgumentHolder &a1,
+ const QtCoreHelper::QGenericArgumentHolder &a2,
+ const QtCoreHelper::QGenericArgumentHolder &a3,
+ const QtCoreHelper::QGenericArgumentHolder &a4,
+ const QtCoreHelper::QGenericArgumentHolder &a5,
+ const QtCoreHelper::QGenericArgumentHolder &a6,
+ const QtCoreHelper::QGenericArgumentHolder &a7,
+ const QtCoreHelper::QGenericArgumentHolder &a8,
+ const QtCoreHelper::QGenericArgumentHolder &a9)
+{
+ PyThreadState *_save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
+ const bool resultB = f(a0.toGenericArgument(), a1.toGenericArgument(), a2.toGenericArgument(),
+ a3.toGenericArgument(), a4.toGenericArgument(), a5.toGenericArgument(),
+ a6.toGenericArgument(), a7.toGenericArgument(), a8.toGenericArgument(),
+ a9.toGenericArgument());
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
+ PyObject *result = resultB ? Py_True : Py_False;
+ Py_INCREF(result);
+ return result;
+}
+
+// Convert a QGenericReturnArgument to Python for QMetaObject::invokeMethod
+static PyObject *convertGenericReturnArgument(const void *retData, QMetaType metaType)
+{
+ PyObject *result = nullptr;
+ switch (metaType.id()) {
+ case QMetaType::Bool:
+ result = *reinterpret_cast<const bool *>(retData) ? Py_True : Py_False;
+ Py_INCREF(result);
+ break;
+ case QMetaType::Int:
+ result = PyLong_FromLong(*reinterpret_cast<const int *>(retData));
+ break;
+ case QMetaType::Double:
+ result = PyFloat_FromDouble(*reinterpret_cast<const double *>(retData));
+ break;
+ case QMetaType::QString:
+ result = PySide::qStringToPyUnicode(*reinterpret_cast<const QString *>(retData));
+ break;
+ default: {
+ Shiboken::Conversions::SpecificConverter converter(metaType.name());
+ const auto type = converter.conversionType();
+ if (type == Shiboken::Conversions::SpecificConverter::InvalidConversion) {
+ PyErr_Format(PyExc_RuntimeError, "%s: Unable to find converter for \"%s\".",
+ __FUNCTION__, metaType.name());
+ return nullptr;
+ }
+ result = converter.toPython(retData);
+ }
+ }
+ return result;
+}
+
+PyObject *invokeMetaMethodWithReturn(const InvokeMetaMethodFuncWithReturn &f,
+ const QtCoreHelper::QGenericReturnArgumentHolder &r,
+ const QtCoreHelper::QGenericArgumentHolder &a0,
+ const QtCoreHelper::QGenericArgumentHolder &a1,
+ const QtCoreHelper::QGenericArgumentHolder &a2,
+ const QtCoreHelper::QGenericArgumentHolder &a3,
+ const QtCoreHelper::QGenericArgumentHolder &a4,
+ const QtCoreHelper::QGenericArgumentHolder &a5,
+ const QtCoreHelper::QGenericArgumentHolder &a6,
+ const QtCoreHelper::QGenericArgumentHolder &a7,
+ const QtCoreHelper::QGenericArgumentHolder &a8,
+ const QtCoreHelper::QGenericArgumentHolder &a9)
+{
+ PyThreadState *_save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
+ const bool callResult = f(r.toGenericReturnArgument(),
+ a0.toGenericArgument(), a1.toGenericArgument(), a2.toGenericArgument(),
+ a3.toGenericArgument(), a4.toGenericArgument(), a5.toGenericArgument(),
+ a6.toGenericArgument(), a7.toGenericArgument(), a8.toGenericArgument(),
+ a9.toGenericArgument());
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
+ if (!callResult) {
+ PyErr_SetString(PyExc_RuntimeError, "QMetaMethod invocation failed.");
+ return nullptr;
+ }
+ return convertGenericReturnArgument(r.data(), r.metaType());
+}
diff --git a/sources/pyside6/PySide6/QtCore/glue/core_snippets_p.h b/sources/pyside6/PySide6/QtCore/glue/core_snippets_p.h
index 9a0a8c0ab..11e84b291 100644
--- a/sources/pyside6/PySide6/QtCore/glue/core_snippets_p.h
+++ b/sources/pyside6/PySide6/QtCore/glue/core_snippets_p.h
@@ -12,11 +12,20 @@
#include <functional>
+QT_FORWARD_DECLARE_CLASS(QGenericArgument)
+QT_FORWARD_DECLARE_CLASS(QGenericReturnArgument)
QT_FORWARD_DECLARE_CLASS(QMetaType)
QT_FORWARD_DECLARE_CLASS(QObject)
QT_FORWARD_DECLARE_CLASS(QRegularExpression)
QT_FORWARD_DECLARE_CLASS(QVariant);
+QT_BEGIN_NAMESPACE
+namespace QtCoreHelper {
+class QGenericArgumentHolder;
+class QGenericReturnArgumentHolder;
+}
+QT_END_NAMESPACE
+
// Helpers for QVariant conversion
QMetaType QVariant_resolveMetaType(PyTypeObject *type);
@@ -48,4 +57,49 @@ void qObjectFindChildren(const QObject *parent, const QRegularExpression &patter
// Helpers for translation
QString qObjectTr(PyTypeObject *type, const char *sourceText, const char *disambiguation, int n);
+bool PyDate_ImportAndCheck(PyObject *pyIn);
+bool PyDateTime_ImportAndCheck(PyObject *pyIn);
+bool PyTime_ImportAndCheck(PyObject *pyIn);
+
+// Helpers for QMetaObject::invokeMethod(), QMetaMethod::invoke(). The std::function
+// serves to abstract from QMetaObject/QMetaMethod invocation parameters.
+using InvokeMetaMethodFunc =
+ std::function<bool(QGenericArgument,QGenericArgument,QGenericArgument,QGenericArgument,
+ QGenericArgument,QGenericArgument,QGenericArgument,QGenericArgument,
+ QGenericArgument,QGenericArgument)>;
+
+using InvokeMetaMethodFuncWithReturn =
+ std::function<bool(QGenericReturnArgument,
+ QGenericArgument,QGenericArgument,QGenericArgument,QGenericArgument,
+ QGenericArgument,QGenericArgument,QGenericArgument,QGenericArgument,
+ QGenericArgument,QGenericArgument)>;
+
+// Call a void meta method from Python passing the argument holder helpers.
+PyObject *invokeMetaMethod(const InvokeMetaMethodFunc &f,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &);
+
+// Call a meta method with a return value from Python passing the argument holder
+// helpers.
+PyObject *invokeMetaMethodWithReturn(const InvokeMetaMethodFuncWithReturn &f,
+ const QtCoreHelper::QGenericReturnArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &,
+ const QtCoreHelper::QGenericArgumentHolder &);
+
#endif // CORE_SNIPPETS_P_H
diff --git a/sources/pyside6/PySide6/QtCore/glue/qiopipe.cpp b/sources/pyside6/PySide6/QtCore/glue/qiopipe.cpp
new file mode 100644
index 000000000..6799c0f32
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/glue/qiopipe.cpp
@@ -0,0 +1,142 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "qiopipe.h"
+
+#include <QtCore/private/qobject_p.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qiodevice.h>
+#include <QtCore/qpointer.h>
+
+#include <memory>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtCoreHelper
+{
+
+class QPipeEndPoint : public QIODevice
+{
+ Q_OBJECT
+
+public:
+ bool isSequential() const override;
+ qint64 bytesAvailable() const override;
+
+ void setRemoteEndPoint(QPipeEndPoint *other);
+
+protected:
+ qint64 readData(char *data, qint64 maxlen) override;
+ qint64 writeData(const char *data, qint64 len) override;
+
+private:
+ QByteArray m_buffer;
+ QPointer<QPipeEndPoint> m_remoteEndPoint;
+};
+
+class QIOPipePrivate final : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QIOPipe)
+public:
+ QIOPipePrivate();
+ ~QIOPipePrivate() {};
+
+ std::unique_ptr<QPipeEndPoint> end1;
+ std::unique_ptr<QPipeEndPoint> end2;
+};
+
+QIOPipe::QIOPipe(QObject *parent) : QObject(*(new QIOPipePrivate()), parent) { }
+
+bool QIOPipe::open(QIODevice::OpenMode mode)
+{
+ Q_D(QIOPipe);
+
+ if (!d->end1->open(mode))
+ return false;
+ switch (mode & QIODevice::ReadWrite) {
+ case QIODevice::WriteOnly:
+ case QIODevice::ReadOnly:
+ return d->end2->open(mode ^ QIODevice::ReadWrite);
+ default:
+ return d->end2->open(mode);
+ }
+}
+
+QIODevice *QIOPipe::end1() const
+{
+ Q_D(const QIOPipe);
+ return d->end1.get();
+}
+
+QIODevice *QIOPipe::end2() const
+{
+ Q_D(const QIOPipe);
+ return d->end2.get();
+}
+
+QIOPipePrivate::QIOPipePrivate() : end1(std::make_unique<QPipeEndPoint>()),
+ end2(std::make_unique<QPipeEndPoint>())
+{
+ end1->setRemoteEndPoint(end2.get());
+ end2->setRemoteEndPoint(end1.get());
+}
+
+bool QPipeEndPoint::isSequential() const
+{
+ return true;
+}
+
+qint64 QPipeEndPoint::bytesAvailable() const
+{
+ return m_buffer.size() + QIODevice::bytesAvailable();
+}
+
+void QPipeEndPoint::setRemoteEndPoint(QPipeEndPoint *other)
+{
+ m_remoteEndPoint = other;
+}
+
+qint64 QPipeEndPoint::readData(char *data, qint64 maxlen)
+{
+ maxlen = qMin(maxlen, static_cast<qint64>(m_buffer.size()));
+ if (maxlen <= 0)
+ return 0;
+
+ Q_ASSERT(maxlen > 0);
+ memcpy(data, m_buffer.data(), static_cast<size_t>(maxlen));
+ m_buffer = m_buffer.mid(maxlen);
+ return maxlen;
+}
+
+qint64 QPipeEndPoint::writeData(const char *data, qint64 len)
+{
+ if (!m_remoteEndPoint)
+ return -1;
+
+ if (len <= 0)
+ return 0;
+
+ QByteArray &buffer = m_remoteEndPoint->m_buffer;
+ const qint64 prevLen = buffer.size();
+ Q_ASSERT(prevLen >= 0);
+ len = qMin(len, std::numeric_limits<int>::max() - prevLen);
+
+ if (len == 0)
+ return 0;
+
+ Q_ASSERT(len > 0);
+ Q_ASSERT(prevLen + len > 0);
+ Q_ASSERT(prevLen + len <= std::numeric_limits<int>::max());
+
+ buffer.resize(prevLen + len);
+ memcpy(buffer.data() + prevLen, data, static_cast<size_t>(len));
+ Q_EMIT bytesWritten(len);
+ Q_EMIT m_remoteEndPoint->readyRead();
+ return len;
+}
+
+} // namespace QtCoreHelper
+
+QT_END_NAMESPACE
+
+#include "qiopipe.moc"
diff --git a/sources/pyside6/PySide6/QtCore/glue/qtcorehelper.cpp b/sources/pyside6/PySide6/QtCore/glue/qtcorehelper.cpp
index 0ce4ce922..948c0ce5c 100644
--- a/sources/pyside6/PySide6/QtCore/glue/qtcorehelper.cpp
+++ b/sources/pyside6/PySide6/QtCore/glue/qtcorehelper.cpp
@@ -5,6 +5,8 @@
#include <QtCore/qdebug.h>
+QT_BEGIN_NAMESPACE
+
namespace QtCoreHelper {
// Data classes for the generic argument data classes. The argument is freed
@@ -50,7 +52,7 @@ QGenericArgumentHolder::QGenericArgumentHolder()
}
QGenericArgumentHolder::QGenericArgumentHolder(const QMetaType &type, const void *aData) :
- d(new QGenericArgumentData(type, aData))
+ d(std::make_shared<QGenericArgumentData>(type, aData))
{
}
@@ -60,23 +62,23 @@ QGenericArgumentHolder &QGenericArgumentHolder::operator=(const QGenericArgument
QGenericArgumentHolder &QGenericArgumentHolder::operator=(QGenericArgumentHolder &&) = default;
QGenericArgumentHolder::~QGenericArgumentHolder() = default;
-QGenericArgumentHolder::operator QGenericArgument() const
+QGenericArgument QGenericArgumentHolder::toGenericArgument() const
{
- return d.isNull() ? QGenericArgument{} : d->m_argument;
+ return d ? d->m_argument : QGenericArgument{};
}
QMetaType QGenericArgumentHolder::metaType() const
{
- return d.isNull() ? QMetaType{} : d->m_type;
+ return d ? d->m_type : QMetaType{};
}
const void *QGenericArgumentHolder::data() const
{
- return d.isNull() ? nullptr : d->m_argument.data();
+ return d ? d->m_argument.data() : nullptr;
}
QGenericReturnArgumentHolder::QGenericReturnArgumentHolder(const QMetaType &type, void *aData) :
- d(new QGenericReturnArgumentData(type, aData))
+ d(std::make_shared<QGenericReturnArgumentData>(type, aData))
{
}
@@ -86,7 +88,7 @@ QGenericReturnArgumentHolder &QGenericReturnArgumentHolder::operator=(const QGen
QGenericReturnArgumentHolder &QGenericReturnArgumentHolder::operator=(QGenericReturnArgumentHolder &&) = default;
QGenericReturnArgumentHolder::~QGenericReturnArgumentHolder() = default;
-QGenericReturnArgumentHolder::operator QGenericReturnArgument() const
+QGenericReturnArgument QGenericReturnArgumentHolder::toGenericReturnArgument() const
{
return d->m_argument;
}
@@ -102,3 +104,5 @@ const void *QGenericReturnArgumentHolder::data() const
}
} // namespace QtCoreHelper
+
+QT_END_NAMESPACE
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core.xml b/sources/pyside6/PySide6/QtCore/typesystem_core.xml
index 7dd664294..885b53874 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtCore">
+<typesystem package="PySide6.QtCore"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<?if windows?>
<load-typesystem name="QtCore/typesystem_core_win.xml" generate="yes"/>
<?endif?>
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index 522fe52fb..0a08928f5 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -17,6 +17,8 @@
<include file-name="pysidemetatype.h" location="global"/>
<include file-name="pysideutils.h" location="global"/> <!-- QString conversion -->
<include file-name="signalmanager.h" location="global"/>
+ <!-- QtCoreHelper::QGenericReturnArgumentHolder -->
+ <include file-name="qtcorehelper.h" location="local"/>
</extra-includes>
<function signature="qFastCos(qreal)" since="4.6"/>
@@ -29,46 +31,73 @@
<function signature="qIsNull(double)"/>
<!-- Qt5: gone <function signature="qRound(qreal)"/> -->
<function signature="qtTrId(const char*,int)" since="4.6"/>
- <function signature="qVersion()"/>
- <function signature="qCompress(const uchar*,qsizetype,int)"/>
- <function signature="qCompress(const QByteArray&amp;,int)"/>
- <function signature="qUncompress(const uchar*,qsizetype)"/>
- <function signature="qUncompress(const QByteArray&amp;)"/>
- <function signature="qFormatLogMessage(QtMsgType,const QMessageLogContext&amp;,const QString&amp;)"/>
- <function signature="qSetMessagePattern(const QString&amp;)"/>
+ <function signature="qVersion()">
+ <modify-function>
+ <modify-argument index="return" pyi-type="str"/>
+ </modify-function>
+ </function>
+ <!-- Move PyBuffer overload to front to avoid conversion PyBuffer->QByteArray -->
+ <function signature="qCompress(const uchar*,qsizetype,int)" overload-number="0">
+ <modify-function>
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qcompress-buffer"/>
+ </modify-function>
+ </function>
+ <function signature="qCompress(const QByteArray&amp;,int)" overload-number="1"/>
+ <!-- Move PyBuffer overload to front to avoid conversion PyBuffer->QByteArray -->
+ <function signature="qUncompress(const uchar*,qsizetype)" overload-number="0">
+ <modify-function>
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="quncompress-buffer"/>
+ </modify-function>
+ </function>
+ <function signature="qUncompress(const QByteArray&amp;)" overload-number="1"/>
+ <function signature="qFormatLogMessage(QtMsgType,const QMessageLogContext&amp;,const QString&amp;)"
+ doc-file="qtlogging"/>
+ <function signature="qSetMessagePattern(const QString&amp;)" doc-file="qtlogging"/>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="include-pyside"/>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
snippet="qarg_helper"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="darwin_permission_plugin"/>
<add-function signature="qDebug(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qCritical(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qFatal(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="qfatal"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qWarning(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
- <add-function signature="Q_ARG(PyTypeObject *@type@, PyObject *@value@)"
+ <add-function signature="Q_ARG(PyObject *@type@, PyObject *@value@)"
return-type="QtCoreHelper::QGenericArgumentHolder">
<inject-code file="../glue/qtcore.cpp" snippet="q_arg"/>
<inject-documentation format="target" mode="append">
- This function takes a type and a value of that type and returns an internal
- object that can be passed to QMetaObject.invokeMethod().
- See also Q_RETURN_ARG().
+ This function takes a type (or a type string) and a value of that type
+ and returns an internal object that can be passed to
+ QMetaObject.invokeMethod(). See also Q_RETURN_ARG().
</inject-documentation>
</add-function>
- <add-function signature="Q_RETURN_ARG(PyTypeObject *@type@)"
+ <add-function signature="Q_RETURN_ARG(PyObject *@type@)"
return-type="QtCoreHelper::QGenericReturnArgumentHolder">
<inject-code file="../glue/qtcore.cpp" snippet="q_return_arg"/>
<inject-documentation format="target" mode="append">
- This macro takes a type a value of which is then returned by
- QMetaObject::invokeMethod(). See also Q_ARG().
+ This macro takes a type (or a type string) a value of which is then
+ returned by QMetaObject::invokeMethod(). See also Q_ARG().
</inject-documentation>
</add-function>
@@ -85,53 +114,53 @@
<rejection class="QtSharedPointer"/>
<rejection class="QtStringBuilder"/>
+ <rejection class="q20"/>
+ <rejection class="q23"/>
+ <rejection class="q_has_char8_t"/>
+ <rejection class="QContainerInfo"/>
+ <rejection class="QHashPrivate"/>
+ <rejection class="q_no_char8_t"/>
+ <rejection class="Qt::Literals"/>
+ <rejection class="QtLiterals"/>
+ <rejection class="QtMetaContainerPrivate"/>
+ <rejection class="QtTsan"/>
+ <rejection class="QTypeTraits"/>
+ <rejection class="qxp"/>
+
<rejection class="QChildEvent" field-name="c"/>
<rejection class="QTimerEvent" field-name="id"/>
<rejection class="QEvent" field-name="t"/>
<rejection class="*" function-name="tr"/>
- <rejection class="*" function-name="qt_metacast"/>
<!-- From Qt4.6 -->
<rejection class="*" field-name="d_ptr"/>
- <rejection class="*" field-name="staticQtMetaObject"/>
- <rejection class="*" function-name="qobject_interface_iid"/>
- <rejection class="*" function-name="qGetPtrHelper"/>
- <rejection class="*" function-name="q_check_ptr"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QTextCodecFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qRegisterAnimationInterpolator"/>
- <rejection class="*" function-name="qvariant_cast&lt;QVariant&gt;"/>
- <rejection class="*" function-name="qVariantSetValue&lt;QVariant&gt;"/>
- <rejection class="*" function-name="qReallocAligned"/>
- <rejection class="*" function-name="qMallocAligned"/>
- <rejection class="*" function-name="qFreeAligned"/>
<rejection class="QMetaMethod" enum-name="Attributes"/>
+ <rejection class="QMetaMethod" field-name="data"/>
+ <!-- Note: Default parameter values of Disambiguated_t as defined by
+ QT6_DECL_NEW_OVERLOAD_TAIL are not seen by the clang parser since it
+ is relying on code snippets for the values. -->
+ <rejection class="Qt" field-name="Disambiguated"/>
+ <rejection class="" enum-name="QCborNegativeInteger"/>
<rejection class="*" argument-type="^qfloat16&amp;?$"/>
- <rejection class="*" argument-type="QLatin1String"/>
<rejection class="*" argument-type="QTSMFI"/>
<rejection class="*" argument-type="QTSMFC"/>
<rejection class="*" argument-type="QtPrivate::QSlotObjectBase*"/>
<rejection class="*" argument-type="^Q\w+Private( const)?\&amp;$"/>
<!-- Note: "QHelpModel(QHelpEnginePrivate*)" is needed -->
<rejection class="*" argument-type="^Q[^H]\w+Private( const)?\*$"/>
- <rejection class="*" argument-type="^.*::QPrivateSignal$"/>
<rejection class="*" argument-type="Qt::Initialization"/>
<rejection class="*" argument-type="FILE*"/>
<rejection class="*" argument-type="std::chrono::milliseconds"/>
<rejection class="*" argument-type="^std::nullptr_t&amp;?$"/>
<rejection class="*" argument-type="^std::initializer_list&lt;.*$"/>
- <rejection class="*" argument-type="^std::list&lt;[^&gt;]&gt; const&amp;$"/>
- <rejection class="*" argument-type="std::string const&amp;"/>
- <rejection class="*" argument-type="^std::vector&lt;[^&gt;]&gt; const&amp;$"/>
<!-- From Qt4.6 ^^^ -->
-
- <enum-type name="QtMsgType"/>
- <enum-type name="QCborSimpleType" since="5.12"/>
- <enum-type name="QCborKnownTags" since="5.12"/>
- <enum-type name="QCborTag"/>
+ <enum-type name="QtMsgType" doc-file="qtlogging"/>
+ <enum-type name="QCborSimpleType" doc-file="qtcborcommon"/>
+ <enum-type name="QCborKnownTags" doc-file="qtcborcommon"/>
+ <enum-type name="QCborTag" doc-file="qtcborcommon"/>
<primitive-type name="qint8"/>
<primitive-type name="qint16"/>
@@ -197,7 +226,14 @@
</target-to-native>
</conversion-rule>
</primitive-type>
-
+ <primitive-type name="QFunctionPointer" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-qfunctionpointer-pylong"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong-qfunctionpointer"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
<primitive-type name="QString" target-lang-api-name="PyUnicode">
<include file-name="QString" location="global"/>
<conversion-rule>
@@ -216,6 +252,17 @@
</conversion-rule>
</primitive-type>
+ <primitive-type name="QLatin1String" target-lang-api-name="PyUnicode">
+ <include file-name="QtCore/qlatin1stringview.h" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-from-qlatin1string"/>
+ <target-to-native>
+ <add-conversion type="PyString" check="qLatin1StringCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-pystring-qlatin1string"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
<primitive-type name="QAnyStringView" target-lang-api-name="PyUnicode" view-on="QString">
<include file-name="QAnyStringView" location="global"/>
<conversion-rule>
@@ -235,6 +282,9 @@
</primitive-type>
<primitive-type name="QVariant" target-lang-api-name="PyObject">
+ <extra-includes>
+ <include file-name="optional" location="global"/>
+ </extra-includes>
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant"/>
<target-to-native>
@@ -244,7 +294,6 @@
<add-conversion type="QByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray"/>
<add-conversion type="PyFloat" check="PyFloat_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pyfloat"/>
<add-conversion type="PyLong" check="PyLong_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
- <add-conversion type="SbkEnumType" file="../glue/qtcore.cpp" snippet="conversion-sbkobject"/>
<add-conversion type="SbkObject" file="../glue/qtcore.cpp" snippet="conversion-sbkobject"/>
<add-conversion type="PyDict" check="PyDict_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pydict"/>
<add-conversion type="PyList" check="PyList_Check(%in)" file="../glue/qtcore.cpp" snippet="conversion-pylist"/>
@@ -271,24 +320,24 @@
</conversion-rule>
</primitive-type>
- <value-type name="QCborError" since="5.12">
+ <value-type name="QCborError">
<enum-type name="Code"/>
<include file-name="qcborcommon.h" location="global"/>
</value-type>
- <value-type name="QCborParserError" since="5.12">
+ <value-type name="QCborParserError">
<include file-name="qcborvalue.h" location="global"/>
</value-type>
- <value-type name="QCborValue" since="5.12">
+ <value-type name="QCborValue">
<enum-type name="EncodingOption" flags="EncodingOptions"/>
<enum-type name="DiagnosticNotationOption" flags="DiagnosticNotationOptions"/>
<enum-type name="Type"/>
</value-type>
- <value-type name="QCborArray" since="5.12"/>
- <value-type name="QCborMap" since="5.12"/>
+ <value-type name="QCborArray"/>
+ <value-type name="QCborMap"/>
- <object-type name="QCborStreamReader" since="5.12">
+ <object-type name="QCborStreamReader">
<enum-type name="StringResultCode"/>
<enum-type name="Type"/>
<include file-name="qcborstream.h" location="global"/>
@@ -298,9 +347,9 @@
<!-- 32bit (qsizetype = int) -->
<modify-function signature="readStringChunk(char*,int)" remove="all"/>
</object-type>
- <typedef-type name="QCborStringResultString" source="QCborStreamReader::StringResult&lt;QString&gt;" since="5.12"/>
- <typedef-type name="QCborStringResultByteArray" source="QCborStreamReader::StringResult&lt;QByteArray&gt;" since="5.12"/>
- <object-type name="QCborStreamWriter" since="5.12">
+ <typedef-type name="QCborStringResultString" source="QCborStreamReader::StringResult&lt;QString&gt;"/>
+ <typedef-type name="QCborStringResultByteArray" source="QCborStreamReader::StringResult&lt;QByteArray&gt;"/>
+ <object-type name="QCborStreamWriter">
<include file-name="qcborstream.h" location="global"/>
</object-type>
@@ -313,18 +362,36 @@
</conversion-rule>
</primitive-type>
- <value-type name="QKeyCombination"/>
+ <value-type name="QKeyCombination">
+ <!-- The following do-nothing function is needed for coercion of constructs like
+ QKeyCombination(Qt.CTRL | Qt.Key_B)
+ -->
+ <add-function signature="QKeyCombination(QKeyCombination)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="keycombination-from-keycombination"/>
+ </add-function>
+ <!-- This is just a copy of KeyModifier to handle Modifier the same -->
+ <add-function signature="QKeyCombination(Qt::Modifier @modifiers@, Qt::Key @key@)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="keycombination-from-modifier"/>
+ </add-function>
+ </value-type>
<value-type name="QMetaType">
<extra-includes>
<include file-name="pysidemetatype.h" location="global"/>
</extra-includes>
- <enum-type name="Type"/>
+ <enum-type name="Type" python-type="IntEnum"/>
<enum-type name="TypeFlag" flags="TypeFlags"/>
<add-function signature="QMetaType(PyTypeObject*)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
snippet="metatype-from-type"/>
</add-function>
+ <!-- PYSIDE-1735: The class QMetaType.Type must be allowed because int is gone -->
+ <add-function signature="QMetaType(QMetaType::Type)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="metatype-from-metatype-type"/>
+ </add-function>
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="conversion-qmetatype-pytypeobject"/>
<target-to-native>
@@ -333,6 +400,10 @@
</conversion-rule>
</value-type>
+ <value-type name="QNativeIpcKey" since="6.6">
+ <enum-type name="Type"/>
+ </value-type>
+
<container-type name="QSet" type="set">
<include file-name="QSet" location="global"/>
<conversion-rule>
@@ -349,7 +420,7 @@
<!-- FIXME: Which one is it going to be? -->
<container-type name="QList" type="list"
- opaque-containers="int:QIntList;QPoint:QPointList;QPointF:QPointFList;QVector2D:QVector2DList;QVector3D:QVector3DList;QVector4D:QVector4DList">
+ opaque-containers="int:QIntList;QPoint:QPointList;QPointF:QPointFList">
<include file-name="QList" location="global"/>
<declare-function signature="append(T)" return-type="void"/>
<declare-function signature="insert(qsizetype,T)" return-type="void"/>
@@ -402,7 +473,6 @@
<container-type name="QHash" type="hash">
<include file-name="QHash" location="global"/>
<!-- Include to make enum flags work. -->
- <include file-name="pysideqflags.h" location="global"/>
<conversion-rule>
<native-to-target>
<insert-template name="shiboken_conversion_qmap_to_pydict"/>
@@ -418,7 +488,6 @@
<container-type name="QMultiHash" type="multi-hash">
<include file-name="QMultiHash" location="global"/>
<!-- Include to make enum flags work. -->
- <include file-name="pysideqflags.h" location="global"/>
<conversion-rule>
<native-to-target>
<insert-template name="shiboken_conversion_qmultihash_to_pydict"/>
@@ -431,6 +500,8 @@
</conversion-rule>
</container-type>
+ <value-type name="QHashSeed" since="6.2"/>
+
<container-type name="QMap" type="map">
<include file-name="QMap" location="global"/>
<conversion-rule>
@@ -480,54 +551,29 @@
<rejection class="*" field-name="d"/>
<rejection class="*" field-name="staticMetaObject"/>
<!-- not support array in property -->
- <rejection class="QTextCodec::ConverterState" field-name="state_data"/>
<rejection class="QUuid" field-name="data1"/>
<rejection class="QUuid" field-name="data2"/>
<rejection class="QUuid" field-name="data3"/>
<rejection class="QUuid" field-name="data4"/>
- <rejection class="" enum-name="QtValidLicenseForTestModule"/>
- <rejection class="" enum-name="QtValidLicenseForDBusModule"/>
- <rejection class="" enum-name="QtValidLicenseForSqlModule"/>
- <rejection class="" enum-name="QtValidLicenseForOpenGLModule"/>
- <rejection class="" enum-name="QtValidLicenseForScriptToolsModule"/>
- <rejection class="" enum-name="__codecvt_result"/>
- <rejection class="" enum-name="enum_1"/>
- <rejection class="" enum-name="enum_2"/>
- <rejection class="" enum-name="QtValidLicenseForXmlModule"/>
- <rejection class="" enum-name="QtValidLicenseForActiveQtModule"/>
- <rejection class="" enum-name="QtValidLicenseForCoreModule"/>
- <rejection class="" enum-name="QtValidLicenseForNetworkModule"/>
- <rejection class="" enum-name="QtValidLicenseForSvgModule"/>
- <rejection class="" enum-name="QtValidLicenseForGuiModule"/>
- <rejection class="" enum-name="QtValidLicenseForHelpModule"/>
<!-- Internal -->
- <rejection class="QAbstractFileEngine"/> <!--
- <rejection class="QAbstractFileEngine" function-name="endEntryList"/>
- <rejection class="QAbstractFileEngine" function-name="extension"/> XXX -->
<rejection class="QCoreApplication" function-name="compressEvent"/>
- <rejection class="QCoreApplication" function-name="eventFilter"/>
- <rejection class="QCoreApplication" function-name="filterEvent"/>
- <rejection class="QCoreApplication" function-name="setEventFilter"/>
- <rejection class="QFile" function-name="setDecodingFunction"/>
- <rejection class="QFile" function-name="setEncodingFunction"/>
- <rejection class="QRegion" function-name="cleanUp"/>
- <rejection class="QSettings" function-name="registerFormat"/>
<namespace-type name="Qt">
<extra-includes>
<include file-name="QtCore/QProperty" location="global"/>
</extra-includes>
- <enum-type name="AlignmentFlag" flags="Alignment"/>
+ <enum-type name="AlignmentFlag" python-type="IntFlag" flags="Alignment"/>
<enum-type name="AnchorPoint" since="4.6"/>
+ <enum-type name="ColorScheme" since="6.5"/>
<enum-type name="ApplicationAttribute"/>
- <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
+ <enum-type name="ApplicationState" flags="ApplicationStates"/>
<enum-type name="ArrowType"/>
<enum-type name="AspectRatioMode"/>
<enum-type name="Axis"/>
<enum-type name="BGMode"/>
<enum-type name="BrushStyle"/>
<enum-type name="CaseSensitivity"/>
- <enum-type name="ChecksumType" since="5.9"/>
+ <enum-type name="ChecksumType"/>
<enum-type name="CheckState"/>
<enum-type name="ClipOperation"/>
<enum-type name="ConnectionType"/>
@@ -540,57 +586,58 @@
<enum-type name="DockWidgetArea" flags="DockWidgetAreas"/>
<enum-type name="DockWidgetAreaSizes"/>
<enum-type name="DropAction" flags="DropActions"/>
- <enum-type name="Edge" flags="Edges" since="5.1"/>
+ <enum-type name="Edge" flags="Edges"/>
<enum-type name="EventPriority"/>
<enum-type name="FillRule"/>
- <enum-type name="FindChildOption" flags="FindChildOptions" since="5.0"/>
- <enum-type name="FocusPolicy"/>
+ <enum-type name="FindChildOption" flags="FindChildOptions"/>
+ <enum-type name="FocusPolicy" python-type="IntFlag"/>
<enum-type name="FocusReason"/>
<enum-type name="GestureFlag" flags="GestureFlags" since="4.6"/>
<enum-type name="GestureState" since="4.6"/>
- <enum-type name="GestureType" since="4.6"/>
+ <enum-type name="GestureType" python-type="IntEnum" since="4.6"/>
<enum-type name="GlobalColor"/>
- <enum-type name="HighDpiScaleFactorRoundingPolicy" since="5.14"/>
+ <enum-type name="HighDpiScaleFactorRoundingPolicy"/>
<enum-type name="HitTestAccuracy"/>
<enum-type name="ImageConversionFlag" flags="ImageConversionFlags"/>
<enum-type name="InputMethodHint" flags="InputMethodHints" since="4.6"/>
<enum-type name="InputMethodQuery" flags="InputMethodQueries"/>
- <enum-type name="EnterKeyType" since="5.6"/>
- <enum-type name="ItemDataRole"/>
+ <enum-type name="EnterKeyType"/>
+ <enum-type name="ItemDataRole" python-type="IntEnum"/>
<enum-type name="ItemFlag" flags="ItemFlags"/>
<enum-type name="ItemSelectionMode"/>
- <enum-type name="ItemSelectionOperation" since="5.5"/>
- <enum-type name="Key"/>
+ <enum-type name="ItemSelectionOperation"/>
+ <enum-type name="Key" python-type="IntEnum"/>
<enum-type name="KeyboardModifier" flags="KeyboardModifiers"/>
<enum-type name="LayoutDirection"/>
<enum-type name="MaskMode"/>
<enum-type name="MatchFlag" flags="MatchFlags"/>
- <enum-type name="Modifier"/>
+ <enum-type name="Modifier" python-type="Flag"/>
<enum-type name="MouseButton" flags="MouseButtons"/>
- <enum-type name="MouseEventFlag" flags="MouseEventFlags" since="5.3"/>
- <enum-type name="MouseEventSource" since="5.3"/>
- <enum-type name="NativeGestureType" since="5.0"/>
+ <enum-type name="MouseEventFlag" flags="MouseEventFlags"/>
+ <enum-type name="MouseEventSource"/>
+ <enum-type name="NativeGestureType"/>
<enum-type name="NavigationMode" since="4.6"/>
<enum-type name="Orientation" flags="Orientations"/>
<enum-type name="PenCapStyle"/>
<enum-type name="PenJoinStyle"/>
<enum-type name="PenStyle"/>
- <enum-type name="ReturnByValueConstant" since="6.0"/>
- <enum-type name="ScreenOrientation" flags="ScreenOrientations" since="5.0"/>
+ <enum-type name="PermissionStatus" since="6.5"/>
+ <enum-type name="ReturnByValueConstant"/>
+ <enum-type name="ScreenOrientation" flags="ScreenOrientations"/>
<enum-type name="ScrollBarPolicy"/>
- <enum-type name="ScrollPhase" since="5.2"/>
+ <enum-type name="ScrollPhase"/>
<enum-type name="ShortcutContext"/>
<enum-type name="SizeHint"/>
<enum-type name="SizeMode"/>
<enum-type name="SortOrder"/>
- <enum-type name="SplitBehaviorFlags" flags="SplitBehavior" since="5.14"/>
- <enum-type name="TabFocusBehavior" since="5.5"/>
+ <enum-type name="SplitBehaviorFlags" flags="SplitBehavior"/>
+ <enum-type name="TabFocusBehavior"/>
<enum-type name="TextElideMode"/>
- <enum-type name="TextFlag"/>
+ <enum-type name="TextFlag" python-type="IntFlag"/>
<enum-type name="TextFormat"/>
<enum-type name="TextInteractionFlag" flags="TextInteractionFlags"/>
<enum-type name="TileRule" since="4.6"/>
- <enum-type name="TimerType" since="5.0"/>
+ <enum-type name="TimerType"/>
<enum-type name="TimeSpec"/>
<enum-type name="ToolBarArea" flags="ToolBarAreas"/>
<enum-type name="ToolBarAreaSizes"/>
@@ -603,17 +650,11 @@
<enum-type name="WindowFrameSection"/>
<enum-type name="WindowModality"/>
<enum-type name="WindowState" flags="WindowStates"/>
- <enum-type name="WindowType" flags="WindowFlags"/>
+ <enum-type name="WindowType" python-type="IntFlag" flags="WindowFlags"/>
<enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>
- <modify-function signature="^operator.\(Qt::AlignmentFlag,Qt::TextFlag\)$"
- remove="all"/>
- <modify-function signature="^operator.\(Qt::TextFlag,Qt::AlignmentFlag\)$"
- remove="all"/>
- <modify-function signature="^operator.\(Qt::TextElideMode,Qt::TextFlag\)$"
- remove="all"/>
- <modify-function signature="^operator.\(Qt::TextFlag,Qt::TextElideMode\)$"
- remove="all"/>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp"
+ snippet="qt-modifier"/>
</namespace-type>
<add-function signature="QEnum(PyObject*)" return-type="PyObject*">
@@ -648,11 +689,13 @@
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-pysideinit"/>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-messagehandler"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qlatin1string-check"/>
<add-function signature="qInstallMessageHandler(PyObject)" return-type="PyObject">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-installmessagehandler"/>
</add-function>
- <value-type name="QDeadlineTimer" since="5.8">
+ <value-type name="QDeadlineTimer">
<enum-type name="ForeverConstant"/>
</value-type>
@@ -660,7 +703,8 @@
<enum-type name="ClockType" since="4.7"/>
</value-type>
- <object-type name="QAbstractTableModel" polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%1)">
+ <object-type name="QAbstractTableModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%B)">
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
@@ -730,14 +774,14 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QLineF.IntersectionType, PySide6.QtCore.QPointF]">
<replace-type modified-type="(intersectType, intersectionPoint)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qlinef-intersect"/>
</modify-function>
</value-type>
<object-type name="QResource">
- <enum-type name="Compression" since="5.13"/>
+ <enum-type name="Compression"/>
<modify-function signature="data()const">
<inject-documentation format="target">
Returns a read only buffer object pointing to the segment of data that this resource represents. If the resource is compressed the data returns is compressed and qUncompress() must be used to access the data. If the resource is a directory None is returned.
@@ -764,25 +808,20 @@
<object-type name="QBasicTimer"/>
<value-type name="QByteArrayMatcher"/>
- <value-type name="QCalendar" since="5.14">
+ <value-type name="QCalendar">
<object-type name="SystemId"/> <!-- not default-constructible -->
<value-type name="YearMonthDay"/>
<enum-type name="System"/>
<enum-type identified-by-value="Unspecified"/>
</value-type>
- <value-type name="QDate" hash-function="PySide::hash" >
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyDate"/>
- </insert-template>
- </inject-code>
+ <value-type name="QDate">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyDate" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qdate-pydate"/>
+ <add-conversion type="PyDate" check="PyDate_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qdate-pydate"/>
</target-to-native>
</conversion-rule>
<extra-includes>
@@ -818,7 +857,7 @@
<modify-argument index="3">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, int, int]">
<replace-type modified-type="(year, month, day)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/>
@@ -827,26 +866,22 @@
<modify-argument index="1">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, int]">
<replace-type modified-type="(week, yearNumber)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-weeknumber"/>
</modify-function>
</value-type>
- <value-type name="QDateTime" hash-function="PySide::hash">
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
- <enum-type name="YearRange" since="5.14"/>
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyDateTime"/>
- </insert-template>
- </inject-code>
+ <value-type name="QDateTime">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
+ <enum-type name="YearRange"/>
+ <enum-type name="TransitionResolution" since="6.7"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyDateTime" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qdatetime-pydatetime"/>
+ <add-conversion type="PyDateTime" check="PyDateTime_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qdatetime-pydatetime"/>
</target-to-native>
</conversion-rule>
<extra-includes>
@@ -859,6 +894,10 @@
<add-function signature="QDateTime(int,int,int,int,int,int)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-2"/>
</add-function>
+ <!-- PYSIDE-1735: Qt::TimeSpec is no more compatible with int -->
+ <add-function signature="QDateTime(int,int,int,int,int,int,int,Qt::TimeSpec=Qt::LocalTime)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-3"/>
+ </add-function>
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -916,10 +955,34 @@
</add-function>
</value-type>
- <value-type name="QPoint" hash-function="PySide::hash">
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
+ <value-type name="QPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+ <value-type name="QBluetoothPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="CommunicationMode" flags="CommunicationModes" since="6.6"/>
+ </value-type>
+ <value-type name="QCalendarPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="AccessMode"/>
+ </value-type>
+ <value-type name="QCameraPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+ <value-type name="QContactsPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="AccessMode"/>
+ </value-type>
+ <value-type name="QLocationPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="Accuracy"/>
+ <enum-type name="Availability"/>
+ </value-type>
+ <value-type name="QMicrophonePermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+
+ <value-type name="QPoint">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -937,7 +1000,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qpoint"/>
<add-function signature="toTuple" return-type="PyObject*">
<inject-code class="target" position="beginning">
@@ -986,10 +1048,7 @@
<modify-function signature="ry()" remove="all"/>
<!--### -->
</value-type>
- <value-type name="QRect" hash-function="PySide::hash">
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
+ <value-type name="QRect">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -1006,7 +1065,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qrect"/>
<modify-function signature="getCoords(int*,int*,int*,int*)const">
<modify-argument index="return">
@@ -1120,10 +1178,7 @@
</inject-code>
</modify-function>
</value-type>
- <value-type name="QSize" hash-function="PySide::hash">
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
+ <value-type name="QSize">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -1141,7 +1196,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsize"/>
<add-function signature="toTuple" return-type="PyObject*">
<inject-code class="target" position="beginning">
@@ -1191,19 +1245,14 @@
<!--### -->
</value-type>
- <value-type name="QTime" hash-function="PySide::hash">
- <extra-includes>
- <include file-name="pysideqhash.h" location="global"/>
- </extra-includes>
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyTime"/>
- </insert-template>
- </inject-code>
+ <value-type name="QTime">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyTime" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qtime-pytime"/>
+ <add-conversion type="PyTime" check="PyTime_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qtime-pytime"/>
</target-to-native>
</conversion-rule>
@@ -1232,6 +1281,13 @@
</add-function>
</value-type>
<value-type name="QPersistentModelIndex">
+ <extra-includes>
+ <include file-name="QtCore/QList" location="global"/>
+ </extra-includes>
+ <!-- For signal QAbstractItemModel::layoutAboutToBeChanged(QList<QPersistentModelIndex>) -->
+ <inject-code class="target" position="end">
+ qRegisterMetaType&lt;QList&lt;QPersistentModelIndex&gt; &gt;("QList_QPersistentModelIndex");
+ </inject-code>
<modify-function signature="internalPointer()const">
<inject-code class="target" position="beginning">
<insert-template name="return_internal_pointer" />
@@ -1245,13 +1301,17 @@
</value-type>
<value-type name="QTimeZone">
+ <configuration condition="QT_CONFIG(timezone)"/>
+ <enum-type name="Initialization" since="6.5"/>
<enum-type name="TimeType"/>
<enum-type name="NameType"/>
- <value-type name="OffsetData"/>
+ <value-type name="OffsetData">
+ <configuration condition="QT_CONFIG(timezone)"/>
+ </value-type>
</value-type>
<value-type name="QUuid">
- <enum-type name="StringFormat" since="5.11"/>
+ <enum-type name="StringFormat"/>
<enum-type name="Variant"/>
<enum-type name="Version"/>
<add-function signature="__repr__" return-type="PyObject*">
@@ -1272,18 +1332,19 @@
</add-function>
</value-type>
- <value-type name="QMimeType" since="5.0"/>
- <object-type name="QMimeDatabase" since="5.0">
+ <value-type name="QMimeType"/>
+ <object-type name="QMimeDatabase">
<enum-type name="MatchMode"/>
</object-type>
<value-type name="QLocale">
+ <enum-type name="TagSeparator" since="6.7"/>
<enum-type name="Country"/>
- <enum-type name="DataSizeFormat" flags="DataSizeFormats" since="5.10"/>
- <enum-type name="FloatingPointPrecisionOption" since="5.7"/>
+ <enum-type name="DataSizeFormat" flags="DataSizeFormats"/>
+ <enum-type name="FloatingPointPrecisionOption" python-type="IntEnum"/>
<enum-type name="FormatType"/>
<enum-type name="Language"/>
- <enum-type name="LanguageCodeType" flags="LanguageCodeTypes" since="6.3"/>
+ <enum-type name="LanguageCodeType" python-type="IntFlag" flags="LanguageCodeTypes" since="6.3"/>
<enum-type name="MeasurementSystem"/>
<enum-type name="NumberOption" flags="NumberOptions"/>
<enum-type name="Script" since="4.8" revision="4800"/>
@@ -1293,26 +1354,60 @@
<modify-function signature="toString(qulonglong)const" remove="all"/>
<modify-function signature="toString(ushort)const" remove="all"/>
<modify-function signature="toString(unsigned int)const" remove="all"/>
+ <modify-function signature="system()" remove="all"/>
<!--### -->
<extra-includes>
<include file-name="QDate" location="global"/>
</extra-includes>
+ <add-function signature="system()" return-type="QLocale" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qlocale_system"/>
+ <inject-documentation mode="append" format="target">
+ Returns a QLocale object initialized to the system locale.
+
+ The system locale may use system-specific sources for locale data, where available,
+ otherwise falling back on QLocale's built-in database entry for the language, script and
+ territory the system reports.
+
+ For example, on Windows, this locale will use the decimal/grouping characters and
+ date/time formats specified in the system configuration panel.
+
+ .. note:: Qt for Python on macOS will not reflect the user's region and language
+ preferences though QLocale::system(), but will instead reflect the environment
+ variables POSIX uses to specify locale, similar to Python's locale module. If the
+ system locale cannot be determined, which can be due to none of the variables 'LC_ALL',
+ 'LC_CTYPE', 'LANG' or 'LANGUAGE' being set by your environment, then the default POSIX
+ locale or 'C' locale is returned.
+
+ See also c().
+ </inject-documentation>
+ </add-function>
<modify-function signature="toTime(QString,QLocale::FormatType)const">
<modify-argument index="2">
<rename to="format"/>
</modify-argument>
</modify-function>
- <modify-function signature="toDate(QString,QLocale::FormatType)const">
+ <modify-function signature="toDate(QString,QLocale::FormatType,int)const">
<modify-argument index="2">
<rename to="format"/>
</modify-argument>
</modify-function>
+ <modify-function signature="^toDate(Time)?\(QString,[^,]+,int\)const$">
+ <modify-argument index="3">
+ <replace-default-expression with="1900"/> <!-- private FirstTwoDigitYear -->
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="^toDate(Time)?\(QString,[^,]+,QCalendar,int\)const$">
+ <modify-argument index="4">
+ <replace-default-expression with="1900"/> <!-- private FirstTwoDigitYear -->
+ </modify-argument>
+ </modify-function>
<modify-function signature="toUInt(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1324,7 +1419,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1336,7 +1431,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]">
<replace-type modified-type="(float, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1348,7 +1443,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]">
<replace-type modified-type="(float, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1359,7 +1454,7 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1370,7 +1465,18 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
+ <replace-type modified-type="(int, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toLong(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1381,7 +1487,7 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1392,13 +1498,18 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
+ <!-- PYSIDE-2133, 2168 remove unsigned overloads of to(Currency)?String() to
+ ensure float overloads are used -->
+ <modify-function signature="^to(Currency)?String\(q?u.*$" remove="all"/>
+ <modify-function signature="^to(Currency)?String\(.*short.*$" remove="all"/>
+ <modify-function signature="^to.*\(.*QStringView.*$" remove="all"/>
</value-type>
<value-type name="QBitArray">
<add-function signature="__len__">
@@ -1418,6 +1529,16 @@
<modify-function signature="removeStaleLockFile()" allow-thread="yes"/>
<modify-function signature="tryLock(int)" allow-thread="yes"/>
<modify-function signature="unlock()" allow-thread="yes"/>
+ <modify-function signature="getLockInfo(qint64*,QString*,QString*)const">
+ <modify-argument index="return" pyi-type="Tuple[int, str, str]">
+ <replace-type modified-type="(int, str, str)"/>
+ </modify-argument>
+ <modify-argument index="1"><remove-argument/></modify-argument>
+ <modify-argument index="2"><remove-argument/></modify-argument>
+ <modify-argument index="3"><remove-argument/></modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="qlockfile-getlockinfo"/>
+ </modify-function>
</object-type>
<object-type name="QMessageAuthenticationCode"/>
<object-type name="QSignalBlocker">
@@ -1438,6 +1559,7 @@
<modify-function signature="tryLockForWrite(int)" allow-thread="yes"/>
</object-type>
<object-type name="QReadLocker">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="QReadLocker(QReadWriteLock*)">
<modify-argument index="1">
<reference-count action="set"/>
@@ -1452,6 +1574,7 @@
</add-function>
</object-type>
<object-type name="QWriteLocker">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="QWriteLocker(QReadWriteLock*)">
<modify-argument index="1">
<reference-count action="set"/>
@@ -1469,6 +1592,7 @@
<enum-type name="IteratorFlag" flags="IteratorFlags"/>
</object-type>
<object-type name="QThread">
+ <configuration condition="QT_CONFIG(thread)"/>
<inject-code file="../glue/qtcore.cpp" class="native" position="beginning" snippet="qthread_pthread_cleanup"/>
<enum-type name="Priority"/>
<modify-function signature="currentThreadId()" remove="all"/>
@@ -1502,7 +1626,7 @@
<value-type name="QModelRoleData"/>
<object-type name="QAbstractItemModel">
- <enum-type name="CheckIndexOption" flags="CheckIndexOptions" since="5.11"/>
+ <enum-type name="CheckIndexOption" flags="CheckIndexOptions"/>
<enum-type name="LayoutChangeHint"/>
<!-- This function was replaced by a added function -->
<modify-function signature="createIndex(int,int,const void*)const" remove="all"/>
@@ -1528,7 +1652,7 @@
</inject-documentation>
</add-function>
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
- <modify-function signature="mimeData(QModelIndexList)const">
+ <modify-function signature="mimeData(QList&lt;QModelIndex&gt;)const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="default"/>
@@ -1538,12 +1662,6 @@
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
</modify-argument>
- <inject-code class="native" position="end" file="../glue/qtcore.cpp"
- snippet="qabstractitemmodel_data"/>
- </modify-function>
- <modify-function signature="headerData(int,Qt::Orientation,int)const">
- <inject-code class="native" position="end" file="../glue/qtcore.cpp"
- snippet="qabstractitemmodel_data"/>
</modify-function>
<modify-function signature="dataChanged(const QModelIndex&amp;,const QModelIndex&amp;,const QVector&lt;int&gt;&amp;)" allow-thread="yes"/>
<modify-function signature="layoutAboutToBeChanged(const QList&lt;QPersistentModelIndex&gt;&amp;,QAbstractItemModel::LayoutChangeHint)" allow-thread="yes"/>
@@ -1577,14 +1695,15 @@
<value-type name="QItemSelectionRange">
</value-type>
- <object-type name="QAbstractProxyModel" polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%1)">
+ <object-type name="QAbstractProxyModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%B)">
<extra-includes>
<include file-name="QItemSelection" location="global"/>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
</object-type>
- <object-type name="QConcatenateTablesProxyModel" since="5.13"/>
+ <object-type name="QConcatenateTablesProxyModel"/>
<object-type name="QSortFilterProxyModel">
<extra-includes>
<include file-name="QItemSelection" location="global"/>
@@ -1598,22 +1717,25 @@
</modify-function>
</object-type>
<object-type name="QIdentityProxyModel"/>
- <object-type name="QTransposeProxyModel" since="5.13"/>
+ <object-type name="QTransposeProxyModel"/>
<!-- QObject is created manually -->
<object-type name="QObject" parent-management="true">
<extra-includes>
<include file-name="QThread" location="global"/>
<include file-name="QCoreApplication" location="global"/>
<include file-name="signalmanager.h" location="local"/>
- <include file-name="glue/core_snippets_p.h" location="local"/>
</extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<modify-function signature="metaObject()const">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-metaobject"/>
<modify-argument index="return">
<reference-count action="set"/>
</modify-argument>
</modify-function>
-
+ <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) -->
+ <modify-function signature="^moveToThread\(.*\)" remove="all"/>
+ <declare-function signature="moveToThread(QThread*)" return-type="bool"/>
<modify-function signature="deleteLater()">
<modify-argument index="this">
<define-ownership owner="c++"/>
@@ -1648,50 +1770,63 @@
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtCore.QObject]"/>
</modify-function>
- <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
- <modify-argument index="4">
- <rename to="type"/>
- </modify-argument>
+ <!-- Manual overload order fixes PYSIDE-2627
+
+ The addition of the qobject-connect-4-context overload resulted in an
+ automatic overload ordering that prevented the right overload from
+ ever being called if the callable was a QObject. Set a manual order to
+ fix this. -->
+ <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const"
+ overload-number="0">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-1"/>
</modify-function>
<!-- static version -->
- <modify-function signature="connect(const QObject*,QMetaMethod,const QObject*,QMetaMethod,Qt::ConnectionType)">
- <modify-argument index="5">
- <rename to="type"/>
- </modify-argument>
+ <modify-function signature="connect(const QObject*,QMetaMethod,const QObject*,QMetaMethod,Qt::ConnectionType)"
+ overload-number="1">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-2"/>
</modify-function>
- <modify-function signature="connect(const QObject*,const char*,const QObject*,const char*,Qt::ConnectionType)">
+ <modify-function signature="connect(const QObject*,const char*,const QObject*,const char*,Qt::ConnectionType)"
+ overload-number="2">
<modify-argument index="5">
<rename to="type"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-3"/>
</modify-function>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect"/>
- <add-function signature="connect(const QObject*,const char*,PyCallable*,Qt::ConnectionType@type@=Qt::AutoConnection)"
- return-type="QMetaObject::Connection" static="yes">
+ <add-function signature="connect(const QObject*@sender@,const char*@signal@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" static="yes" overload-number="3">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4"/>
</add-function>
+ <add-function signature="connect(const QObject*@sender@,const char*@signal@,const QObject*@context@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" static="yes" overload-number="4">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4-context"/>
+ </add-function>
<!-- static version -->
- <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType@type@=Qt::AutoConnection)"
- return-type="QMetaObject::Connection">
+ <add-function signature="connect(const char*@signal@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" overload-number="5">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-5"/>
</add-function>
- <add-function signature="connect(const char*,const QObject*,const char*,Qt::ConnectionType@type@=Qt::AutoConnection)"
- return-type="QMetaObject::Connection">
+ <add-function signature="connect(const char*@signal@,const QObject*@receiver@,const char*@method@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" overload-number="6">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-6"/>
</add-function>
<add-function signature="emit(const char*,...)" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-emit"/>
</add-function>
- <add-function signature="disconnect(const char*,PyCallable*)" return-type="bool">
+ <add-function signature="disconnect(const char*@signal@,PyCallable*@functor@)" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-1"/>
</add-function>
- <add-function signature="disconnect(const QObject*,const char*,PyCallable*)" return-type="bool" static="yes">
+ <add-function signature="disconnect(const QObject*@sender@,const char*@signal@,PyCallable*@functor@)" return-type="bool" static="yes">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-2"/>
</add-function>
+ <modify-function signature="disconnect(QMetaObject::Connection)">
+ <modify-argument index="1">
+ <rename to="connection"/>
+ </modify-argument>
+ </modify-function>
<add-function signature="findChild(PyTypeObject*@type@,const QString&amp;@name@={},Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
@@ -1739,10 +1874,6 @@
</modify-argument>
</add-function>
- <modify-function signature="receivers(const char*)const">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-receivers"/>
- </modify-function>
-
<modify-function signature="destroyed(QObject*)" allow-thread="yes">
<modify-argument index="1">
<rename to="object"/>
@@ -1753,6 +1884,7 @@
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-sender"/>
</modify-function>
<!-- This is not supported due the lack of information durring the call with no arguments, this can cause a memory leak -->
@@ -1768,25 +1900,25 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QAbstractListModel" polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%1)">
+ <object-type name="QAbstractListModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%B)">
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
</object-type>
- <value-type name="QUrlQuery" since="5.0"/>
+ <value-type name="QUrlQuery"/>
- <value-type name="QUrl" hash-function="PySide::hash">
+ <value-type name="QUrl">
<!-- Qt5: lots of changes -->
- <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/>
+ <enum-type name="ComponentFormattingOption" python-type="IntFlag" flags="ComponentFormattingOptions,FormattingOptions"/>
<!-- note: above duplication of attribute is not by default XML compliant! -->
- <enum-type name="UrlFormattingOption"/>
+ <enum-type name="UrlFormattingOption" python-type="IntFlag"/>
<enum-type name="UserInputResolutionOption" flags="UserInputResolutionOptions"/>
<enum-type name="ParsingMode"/>
<enum-type name="AceProcessingOption" flags="AceProcessingOptions" since="6.3"/>
<extra-includes>
<include file-name="QStringList" location="global"/>
- <include file-name="pysideqhash.h" location="global"/>
</extra-includes>
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
@@ -1812,7 +1944,7 @@
</value-type>
<value-type name="QRegularExpression">
- <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions" since="6.0"/>
+ <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions"/>
<enum-type name="MatchOption" flags="MatchOptions"/>
<enum-type name="MatchType"/>
<enum-type name="PatternOption" flags="PatternOptions"/>
@@ -1854,9 +1986,9 @@
<!-- PYSIDE-1913: Disable isNull() for bool cast; __len__ should be used
instead so that b"" yields False. -->
<value-type name="QByteArray" isNull="false">
- <enum-type name="Base64Option" flags="Base64Options" since="5.2"/>
- <enum-type name="Base64DecodingStatus" since="5.15"/>
- <value-type name="FromBase64Result" since="5.15"/>
+ <enum-type name="Base64Option" flags="Base64Options"/>
+ <enum-type name="Base64DecodingStatus"/>
+ <value-type name="FromBase64Result"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
@@ -2096,7 +2228,7 @@
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-msetitem"/>
</add-function>
</value-type>
- <primitive-type name="QByteArrayView" view-on="QByteArray" since="6.0">
+ <primitive-type name="QByteArrayView" view-on="QByteArray">
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-pybytes"/>
</conversion-rule>
@@ -2146,9 +2278,9 @@
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>,int)" allow-thread="yes"/>
</object-type>
- <object-type name="QFileDevice" since="5.0">
+ <object-type name="QFileDevice">
<enum-type name="FileError"/>
- <enum-type name="FileTime" since="5.10"/>
+ <enum-type name="FileTime"/>
<enum-type name="MemoryMapFlag" flags="MemoryMapFlags"/>
<enum-type name="Permission" flags="Permissions"/>
<enum-type name="FileHandleFlag" flags="FileHandleFlags"/>
@@ -2229,12 +2361,21 @@
<modify-function signature="write(const QByteArray&amp;)" allow-thread="yes"/>
<modify-function signature="waitForReadyRead(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
- <!-- ### peek(qint64) do the job -->
<modify-function signature="peek(char*,qint64)" remove="all"/>
- <!-- ### read(qint64) do the job -->
+ <add-function signature="peek(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<modify-function signature="read(char*,qint64)" remove="all"/>
- <!-- ### readLine(qint64) do the job -->
+ <add-function signature="read(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<modify-function signature="readLine(char*,qint64)" remove="all"/>
+ <add-function signature="readLine(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<!-- ### write(str) do the job -->
<modify-function signature="write(const char*,qint64)" remove="all"/>
<modify-function signature="write(const char*)" remove="all"/>
@@ -2268,7 +2409,7 @@
<inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
</modify-function>
</object-type>
- <object-type name="QIODeviceBase" since="6.0">
+ <object-type name="QIODeviceBase">
<enum-type name="OpenModeFlag" flags="OpenMode"/>
</object-type>
<object-type name="QCryptographicHash">
@@ -2283,8 +2424,8 @@
<value-type name="QOperatingSystemVersionBase" since="6.3">
<enum-type name="OSType"/>
</value-type>
- <value-type name="QOperatingSystemVersion" since="5.9">
- <enum-type name="OSType"/>
+ <value-type name="QOperatingSystemVersionUnexported" since="6.3" generate="false"/>
+ <value-type name="QOperatingSystemVersion">
<modify-function signature="QOperatingSystemVersion(const QOperatingSystemVersionBase&amp;)" remove="all"/>
</value-type>
<object-type name="QLibrary">
@@ -2298,6 +2439,7 @@
</object-type>
<namespace-type name="QtCoreHelper" visible="no">
<object-type name="QMutexLocker" copyable="no">
+ <configuration condition="QT_CONFIG(thread)"/>
<!-- PYSIDE-1271: Creating locking capable objects inside sections that
contain allow-thread, require the classes to also allow having threads.
The lack of the option here, was generating a deadlock when running a
@@ -2325,46 +2467,53 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <add-function signature="__enter__()" return-type="QMutexLocker">
+ <add-function signature="__enter__()" return-type="QtCoreHelper::QMutexLocker">
<inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
</add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
</add-function>
</object-type>
+ <object-type name="QIOPipe"/>
<value-type name="QGenericArgumentHolder"/>
<value-type name="QGenericReturnArgumentHolder"/>
</namespace-type>
<!-- Qt5 addition -->
<object-type name="QBasicMutex">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="lock()" allow-thread="yes"/>
<modify-function signature="tryLock()" allow-thread="yes"/>
</object-type>
<object-type name="QMutex">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="tryLock(int)" allow-thread="yes"/>
</object-type>
- <object-type name="QRecursiveMutex" since="5.14">
+ <object-type name="QRecursiveMutex">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="lock()" allow-thread="yes"/>
<modify-function signature="tryLock(int)" allow-thread="yes"/>
</object-type>
- <object-type name="QRandomGenerator" since="5.10">
+ <object-type name="QRandomGenerator">
<modify-function signature="global()" rename="global_"/>
<modify-function signature="operator()()" remove="all"/>
<modify-function signature="generate(quint32*,quint32*)" remove="all"/>
</object-type>
- <object-type name="QRandomGenerator64" since="5.10">
+ <object-type name="QRandomGenerator64">
<modify-function signature="global()" rename="global_"/>
<modify-function signature="operator()()" remove="all"/>
</object-type>
<object-type name="QSemaphore">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="acquire(int)" allow-thread="yes"/>
<modify-function signature="tryAcquire(int,int)" allow-thread="yes"/>
</object-type>
- <object-type name="QSemaphoreReleaser" since="5.10"/>
+ <object-type name="QSemaphoreReleaser">
+ <configuration condition="QT_CONFIG(thread)"/>
+ </object-type>
- <value-type name="QSocketDescriptor" since="5.15">
+ <value-type name="QSocketDescriptor">
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsocketdescriptor"/>
</value-type>
<object-type name="QSocketNotifier">
@@ -2405,6 +2554,7 @@
</modify-function>
</object-type>
<object-type name="QWaitCondition">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="wait(QMutex*,QDeadlineTimer)" allow-thread="yes"/>
<modify-function signature="wait(QMutex*,unsigned long)" allow-thread="yes"/>
<modify-function signature="wait(QReadWriteLock*,QDeadlineTimer)" allow-thread="yes"/>
@@ -2417,19 +2567,28 @@
</object-type>
<object-type name="QBuffer">
<!-- ### setData(QByteArray) do the job -->
- <modify-function signature="setData(const char*,int)" remove="all"/>
+ <modify-function signature="setData(const char*,qsizetype)" remove="all"/>
<!-- Disambiguate from Qt3DRender/qbuffer.h -->
<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>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qtimer-singleshot-functorclass"/>
<modify-function signature="singleShot(int,const QObject*,const char*)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-direct-mapping"/>
</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 signature="singleShot(int@msec@,PyCallable*@functor@)" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-functor"/>
+ </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)"/>
<enum-type name="ExitStatus"/>
<enum-type name="InputChannelMode"/>
<enum-type name="ProcessChannel"/>
@@ -2437,6 +2596,11 @@
<enum-type name="ProcessError"/>
<enum-type name="ProcessState"/>
+ <?if !windows?>
+ <enum-type name="UnixProcessFlag" flags="UnixProcessFlags" since="6.6"/>
+ <value-type name="UnixProcessParameters" since="6.6"/>
+ <?endif?>
+
<modify-function signature="waitForStarted(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
<modify-function signature="waitForFinished(int)" allow-thread="yes"/>
@@ -2447,7 +2611,7 @@
<modify-argument index="4">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, int]">
<replace-type modified-type="(retval, pid)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
@@ -2455,14 +2619,14 @@
</object-type>
<object-type name="QSignalMapper"/>
- <object-type name="QCollatorSortKey" since="5.2"/>
- <object-type name="QCollator" since="5.2"/>
+ <object-type name="QCollatorSortKey"/>
+ <object-type name="QCollator"/>
- <object-type name="QCommandLineOption" since="5.2">
- <enum-type name="Flag" flags="Flags" since="5.8"/>
+ <object-type name="QCommandLineOption">
+ <enum-type name="Flag" flags="Flags"/>
</object-type>
- <object-type name="QCommandLineParser" since="5.2">
- <enum-type name="OptionsAfterPositionalArgumentsMode" since="5.6"/>
+ <object-type name="QCommandLineParser">
+ <enum-type name="OptionsAfterPositionalArgumentsMode"/>
<enum-type name="SingleDashWordOptionMode"/>
</object-type>
@@ -2475,20 +2639,17 @@
<include file-name="pysidecleanup.h" location="global"/>
<include file-name="pysideqapp.h" location="global"/>
</extra-includes>
- <!-- constructor documentation -->
- <inject-documentation format="target" mode="append">
-.. class:: QCoreApplication(args)
-
- Constructs a Qt kernel application. Kernel applications are applications
- without a graphical user interface. These type of applications are used
- at the console or as server processes.
-
- The *args* argument is processed by the application, and made available
- in a more convenient form by the :meth:`~QCoreApplication.arguments()`
- method.
- </inject-documentation>
- <add-function signature="QCoreApplication(QStringList)">
+ <add-function signature="QCoreApplication(QStringList@args@)">
<inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
+ <inject-documentation format="target" mode="append">
+ Constructs a Qt kernel application. Kernel applications are applications
+ without a graphical user interface. These type of applications are used
+ at the console or as server processes.
+
+ The *args* argument is processed by the application, and made available
+ in a more convenient form by the :meth:`~PySide6.QtCore.QCoreApplication.arguments()`
+ method.
+ </inject-documentation>
</add-function>
<add-function signature="QCoreApplication()">
<inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
@@ -2524,6 +2685,43 @@
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
+ <modify-function signature="translate(const char*,const char*,const char *,int)">
+ <modify-argument index="1" pyi-type="str"/>
+ <modify-argument index="2" pyi-type="str"/>
+ <modify-argument index="3" pyi-type="Optional[str]"/>
+ </modify-function>
+ <?if !no_QPermission?>
+ <declare-function signature="checkPermission(const QBluetoothPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QCalendarPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QCameraPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QContactsPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QLocationPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QMicrophonePermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <add-function signature="requestPermission(const QBluetoothPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QCalendarPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QCameraPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QContactsPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QLocationPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QMicrophonePermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <?endif?>
</object-type>
<object-type name="QSettings">
<enum-type name="Format"/>
@@ -2532,10 +2730,12 @@
<extra-includes>
<include file-name="QStringList" location="global"/>
</extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="settings-value-helpers"/>
<!-- PYSIDE-1010:
We remove the original implementation of value() to include the optional parameter -->
<modify-function signature="value(QAnyStringView,const QVariant&amp;)const" remove="all"/>
- <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = 0, PyObject* @type@ = 0)" return-type="PyObject*">
+ <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = {}, PyObject* @type@ = nullptr)" return-type="PyObject*">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qsettings-value"/>
<inject-documentation mode="append" format="target">
Custom overload that adds an optional named parameter to the function ``value()``
@@ -2562,27 +2762,30 @@
</object-type>
<object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None"
qt-register-metatype="base">
- <enum-type name="Type"/>
+ <enum-type name="Type" python-type="IntEnum"/>
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning"
file="../glue/qtcore.cpp" snippet="repr-qevent"/>
</add-function>
</object-type>
- <object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&gt;type() == QEvent::ChildRemoved">
+ <object-type name="QChildEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ChildAdded || %B-&gt;type() == QEvent::ChildPolished || %B-&gt;type() == QEvent::ChildRemoved">
<modify-function signature="child()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QTimerEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Timer"/>
- <object-type name="QDynamicPropertyChangeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DynamicPropertyChange"/>
+ <object-type name="QTimerEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Timer"/>
+ <object-type name="QDynamicPropertyChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::DynamicPropertyChange"/>
<object-type name="QDataStream" stream="yes">
<enum-type name="FloatingPointPrecision" since="4.6"/>
<enum-type name="Status"/>
- <enum-type name="Version"/>
+ <enum-type name="Version" python-type="IntEnum"/>
<enum-type name="ByteOrder"/>
<extra-includes>
<include file-name="QtCore/QtCore" location="global"/>
@@ -2644,13 +2847,19 @@
<add-function signature="readQVariant()" return-type="QVariant">
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
</add-function>
- <modify-function signature="readRawData(char*,int)">
+ <modify-function signature="readRawData(char*,qint64)">
+ <modify-argument index="return" pyi-type="bytes"/>
<modify-argument index="1">
<remove-argument />
</modify-argument>
<inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-readrawdata"/>
</modify-function>
- <modify-function signature="writeRawData(const char*,int)">
+ <add-function signature="writeRawData(PyBuffer)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata-pybuffer"/>
+ </add-function>
+ <modify-function signature="writeRawData(const char*,qint64)">
+ <modify-argument index="1" pyi-type="str"/>
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -2731,7 +2940,7 @@
<add-function signature="writeString(QString)">
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
</add-function>
- <modify-function signature="readBytes(char*&amp;,uint&amp;)">
+ <modify-function signature="readBytes(char*&amp;,qint64&amp;)">
<modify-argument index="return">
<replace-type modified-type="PyTuple"/>
</modify-argument>
@@ -2740,8 +2949,9 @@
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatastream-read-bytes"/>
</modify-function>
+ <modify-function signature="readBytes(char*&amp;,uint&amp;)" remove="all"/>
- <modify-function signature="writeBytes(const char*,uint)">
+ <modify-function signature="writeBytes(const char*,qint64)">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
<conversion-rule class="native">
@@ -2771,7 +2981,7 @@
<!-- Removed because it expect QString to be mutable -->
<modify-function signature="QTextStream(QString*,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
<!-- Qt5.5: Removed because it expect QString to be mutable -->
- <modify-function signature="readLineInto(QString*,qint64)" since="5.5" remove="all"/>
+ <modify-function signature="readLineInto(QString*,qint64)"/>
<!-- Removed because we use the non-const version -->
<modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
@@ -2814,16 +3024,18 @@
<modify-function signature="readLine(qint64)" allow-thread="yes"/>
<modify-function signature="readAll()" allow-thread="yes"/>
</object-type>
- <object-type name="QStandardPaths" since="5.0">
+ <object-type name="QStandardPaths">
<enum-type name="StandardLocation"/>
<enum-type name="LocateOption" flags="LocateOptions"/>
</object-type>
<object-type name="QSystemSemaphore">
+ <configuration condition="#ifndef QT_NO_SYSTEMSEMAPHORE"/>
<enum-type name="AccessMode"/>
<enum-type name="SystemSemaphoreError"/>
</object-type>
<object-type name="QThreadPool">
+ <configuration condition="QT_CONFIG(thread)"/>
<modify-function signature="clear()" allow-thread="yes"/>
<modify-function signature="activeThreadCount()const" allow-thread="yes"/>
<modify-function signature="releaseThread()" allow-thread="yes"/>
@@ -2903,19 +3115,23 @@
</value-type>
<object-type name="QFutureInterfaceBase">
+ <configuration condition="QT_CONFIG(future)"/>
<enum-type name="State"/>
<enum-type name="CancelMode" since="6.3"/>
</object-type>
<value-type name="QFuture" generate="no">
<include file-name="QtCore/qfuture.h" location="global"/>
+ <configuration condition="QT_CONFIG(future)"/>
<modify-function signature="waitForFinished()" allow-thread="yes"/>
</value-type>
<object-type name="QFutureWatcherBase" generate="no">
+ <configuration condition="QT_CONFIG(future)"/>
<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"/>
+ <configuration condition="QT_CONFIG(future)"/>
</object-type>
<!--// FIXME PYSIDE 7: Remove in favor of QtCoreHelper::QGenericArgumentHolder for
@@ -2929,18 +3145,92 @@
<include file-name="qobjectdefs.h" location="global"/>
</value-type>
- <object-type name="QMessageLogContext" since="5.14"/>
-
- <object-type name="QMessageLogContext" since="5.9" until="5.13.2">
- <modify-function signature="copy(const QMessageLogContext &amp;)" remove="all"/>
- </object-type>
+ <object-type name="QMessageLogContext"/>
<value-type name="QMetaMethod">
+ <extra-includes>
+ <include file-name="pysidesignal.h" location="global"/>
+ <include file-name="glue/core_snippets_p.h" location="local"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-helpers"/>
<enum-type name="Access"/>
<enum-type name="MethodType"/>
+ <add-function signature="fromSignal(PySideSignalInstance@signal@)"
+ return-type="QMetaMethod" static="true">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-from-signal"/>
+ <inject-documentation format="target" mode="append">
+ Returns the meta-method that corresponds to the given signal, or an invalid QMetaMethod
+ if signal is not a signal of the class.
+ </inject-documentation>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-conn-type-return-arg"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-return-arg"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-conn-type"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke"/>
+ </add-function>
<!-- This isn't part of Qt public API -->
<modify-function signature="attributes()const" remove="all"/>
<modify-function signature="getParameterTypes(int*)const" remove="all"/>
+ <modify-field name="mobj" remove="yes"/>
</value-type>
<object-type name="QMetaObject">
<enum-type name="Call"/>
@@ -2948,6 +3238,7 @@
<extra-includes>
<include file-name="dynamicqmetaobject.h" location="global"/>
<include file-name="pysidemetatype.h" location="global"/>
+ <include file-name="glue/core_snippets_p.h" location="local"/>
<include file-name="pysideutils.h" location="global"/> <!-- QString conversion -->
</extra-includes>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
@@ -2960,22 +3251,64 @@
<declare-function signature="operator bool() const" return-type="bool"/>
</value-type>
<modify-function signature="^invokeMethod\(" allow-thread="yes"/>
- <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,QtCoreHelper::QGenericArgumentHolder@val0@={},QtCoreHelper::QGenericArgumentHolder@val1@={},QtCoreHelper::QGenericArgumentHolder@val2@={})"
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
static="yes" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
snippet="qmetaobject-invokemethod-conn-type-arg"/>
</add-function>
- <add-function signature="invokeMethod(QObject*@object@,const char *@member@,QtCoreHelper::QGenericArgumentHolder@val0@={},QtCoreHelper::QGenericArgumentHolder@val1@={},QtCoreHelper::QGenericArgumentHolder@val2@={})"
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
static="yes" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
snippet="qmetaobject-invokemethod-arg"/>
</add-function>
- <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,QtCoreHelper::QGenericReturnArgumentHolder@ret@,QtCoreHelper::QGenericArgumentHolder@val0@={},QtCoreHelper::QGenericArgumentHolder@val1@={},QtCoreHelper::QGenericArgumentHolder@val2@={})"
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
static="yes" return-type="PyObject*">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
snippet="qmetaobject-invokemethod-conn-type-return-arg"/>
</add-function>
- <add-function signature="invokeMethod(QObject*@object@,const char *@member@,QtCoreHelper::QGenericReturnArgumentHolder@ret@,QtCoreHelper::QGenericArgumentHolder@val0@={},QtCoreHelper::QGenericArgumentHolder@val1@={},QtCoreHelper::QGenericArgumentHolder@val2@={})"
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
static="yes" return-type="PyObject*">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
snippet="qmetaobject-invokemethod-return-arg"/>
@@ -2983,6 +3316,27 @@
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qmetaobject-repr"/>
</add-function>
+ <modify-function signature="indexOfClassInfo(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfConstructor(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfEnumerator(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfMethod(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfProperty(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfSignal(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfSlot(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
</object-type>
<value-type name="QMetaProperty" >
<!-- This isn't part of Qt public API -->
@@ -3104,13 +3458,14 @@
</value-type>
<value-type name="QMargins" since="4.6"/>
- <value-type name="QMarginsF" since="5.3"/>
+ <value-type name="QMarginsF"/>
<object-type name="QParallelAnimationGroup" since="4.6"/>
<object-type name="QPauseAnimation" since="4.6"/>
<value-type name="QProcessEnvironment" since="4.6">
+ <configuration condition="QT_CONFIG(processenvironment)"/>
<enum-type name="Initialization" since="6.3"/>
</value-type>
@@ -3120,7 +3475,7 @@
<object-type name="QVariantAnimation" since="4.6"/>
- <value-type name="QVersionNumber" since="5.6">
+ <value-type name="QVersionNumber">
<modify-function signature="fromString(QAnyStringView,qsizetype*)">
<modify-argument index="2">
<remove-argument/>
@@ -3132,10 +3487,12 @@
<add-function signature="SIGNAL(const char*)" return-type="str">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-signal"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="SLOT(const char*)" return-type="str">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-slot"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="QT_TR_NOOP(PyObject)" return-type="PyObject*">
@@ -3173,12 +3530,18 @@
</add-function>
<object-type name="QFactoryInterface"/>
- <object-type name="QRunnable"/>
+ <object-type name="QRunnable">
+ <configuration condition="QT_CONFIG(thread)"/>
+ <add-function signature="create(PyObject* @functionToRun@)" static="yes" return-type="QRunnable*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qrunnable_create"/>
+ </add-function>
+ </object-type>
<object-type name="QPluginLoader"/>
<object-type name="QStringListModel"/>
<object-type name="QSharedMemory">
+ <configuration condition="#ifndef QT_NO_SHAREDMEMORY"/>
<enum-type name="AccessMode"/>
<enum-type name="SharedMemoryError"/>
<modify-function signature="data()">
@@ -3216,25 +3579,25 @@
<include file-name="qloggingcategory.h" location="global" />
</extra-includes>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
- qCDebug(*category, "%s", %2);
+ qCDebug((*category), "%s", %2);
</inject-code>
</add-function>
<add-function signature="qCCritical(PyObject *, const char *)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
- qCCritical(*category, "%s", %2);
+ qCCritical((*category), "%s", %2);
</inject-code>
</add-function>
<add-function signature="qCInfo(PyObject *, const char *)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
- qCInfo(*category, "%s", %2);
+ qCInfo((*category), "%s", %2);
</inject-code>
</add-function>
<add-function signature="qCWarning(PyObject *, const char *)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
- qCWarning(*category, "%s", %2);
+ qCWarning((*category), "%s", %2);
</inject-code>
</add-function>
@@ -3243,19 +3606,20 @@
<suppress-warning text="^Anonymous enum.*does not have a type entry.*$"/>
<suppress-warning text="Visibility of function '*' modified in class '*'"/>
- <suppress-warning text="hiding of function '*' in class '*'"/>
<suppress-warning text="Shadowing: *"/>
- <suppress-warning text="namespace '*' does not have a type entry"/>
+ <suppress-warning text="^namespace '.*' does not have a type entry.*$"/>
<!-- QCborStreamReader: Suppress warnings about 32/64bit signatures not found depending on qsizetype -->
<suppress-warning text="^signature 'readStringChunk\(char.*in 'QCborStreamReader' not found.*$"/>
<!-- TODO: this need be removed -->
- <suppress-warning text="^skipping function '.*', unmatched return type '.*$"/>
- <suppress-warning text="^skipping function '.*', unmatched type '.*$"/>
- <suppress-warning text="skipping field 'QStringConverter::iface' with unmatched type 'QStringConverter::Interface'"/>
- <suppress-warning text="skipping field 'Qt::Uninitialized' with unmatched type 'Qt::Initialization'"/>
- <suppress-warning text="skipping field 'State::clearFn' with unmatched type 'void'"/>
+ <suppress-warning text="^skipping.*function '.*', unmatched return type '.*$"/>
+ <suppress-warning text="^skipping.*function '.*', unmatched type '.*$"/>
+ <suppress-warning text="skipping protected field 'QStringConverter::iface' with unmatched type 'QStringConverter::Interface'"/>
+ <suppress-warning text="^skipping public field 'Qt::.*' with unmatched type 'Qt::.*ordering'$"/>
+ <suppress-warning text="skipping public field 'Qt::Uninitialized' with unmatched type 'Qt::Initialization'"/>
+ <suppress-warning text="skipping public field 'State::clearFn' with unmatched type 'void'"/>
<suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
<suppress-warning text="^.*inherits from a non polymorphic type.*QIODeviceBase.*type discovery based on RTTI is impossible.*$"/>
+ <suppress-warning text="Base class 'QOperatingSystemVersionUnexported' of class 'QOperatingSystemVersion' not found in the type system for setting up inheritance."/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtDBus/CMakeLists.txt b/sources/pyside6/PySide6/QtDBus/CMakeLists.txt
index 1686df84f..5ee8dc67c 100644
--- a/sources/pyside6/PySide6/QtDBus/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtDBus/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtDBus)
set(QtDBus_SRC
diff --git a/sources/pyside6/PySide6/QtDBus/typesystem_dbus.xml b/sources/pyside6/PySide6/QtDBus/typesystem_dbus.xml
index 8580c339e..ebed22257 100644
--- a/sources/pyside6/PySide6/QtDBus/typesystem_dbus.xml
+++ b/sources/pyside6/PySide6/QtDBus/typesystem_dbus.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtDBus">
+<typesystem package="PySide6.QtDBus"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<namespace-type name="QDBus">
@@ -53,6 +54,8 @@
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
+ <!-- PYSIDE-2547, hangs -->
+ <modify-function signature="^connect\(.*\)$" allow-thread="yes"/>
</value-type>
<object-type name="QDBusConnectionInterface">
<enum-type name="RegisterServiceReply"/>
@@ -82,7 +85,12 @@
<value-type name="QDBusError">
<enum-type name="ErrorType"/>
</value-type>
- <object-type name="QDBusInterface"/>
+ <object-type name="QDBusInterface" qt-metaobject="no">
+ <inject-documentation format="target" mode="append">
+ DBus signals can be captured with string-based connections
+ (see :ref:`signals-and-slots-strings`).
+ </inject-documentation>
+ </object-type>
<value-type name="QDBusMessage">
<enum-type name="MessageType"/>
</value-type>
@@ -100,7 +108,7 @@
</object-type>
<object-type name="QDBusSignature"/>
<object-type name="QDBusUnixFileDescriptor"/>
- <object-type name="QDBusVariant"/>
+ <value-type name="QDBusVariant"/>
<object-type name="QDBusVirtualObject"/>
<suppress-warning text='^.*Unable to translate type "QDBusReply&lt;.*$'/>
<suppress-warning text='^.*QDBusPendingCallWatcher inherits from a non polymorphic type.*$'/>
diff --git a/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt b/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt
index b11006df1..1276b424f 100644
--- a/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtDataVisualization)
list(APPEND QtDataVisualization_src "${QtDataVisualization_SOURCE_DIR}/qtdatavisualization_helper.cpp")
@@ -51,10 +54,8 @@ set(QtDataVisualization_include_dirs ${QtDataVisualization_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR})
-set(QtDataVisualization_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}DataVisualization_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
+set(QtDataVisualization_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}DataVisualization_LIBRARIES})
set(QtDataVisualization_deps QtCore QtGui)
diff --git a/sources/pyside6/PySide6/QtDataVisualization/qtdatavisualization_helper.cpp b/sources/pyside6/PySide6/QtDataVisualization/qtdatavisualization_helper.cpp
index 12384a093..8ad31a77a 100644
--- a/sources/pyside6/PySide6/QtDataVisualization/qtdatavisualization_helper.cpp
+++ b/sources/pyside6/PySide6/QtDataVisualization/qtdatavisualization_helper.cpp
@@ -57,6 +57,14 @@ QSurfaceDataArray *surfaceDataFromNp(double xStart, double deltaX, double zStart
return result;
switch (view.type) {
+ case Shiboken::Numpy::View::Int16:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const int16_t *>(view.data), result);
+ break;
+ case Shiboken::Numpy::View::Unsigned16:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const uint16_t *>(view.data), result);
+ break;
case Shiboken::Numpy::View::Int:
populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
reinterpret_cast<const int *>(view.data), result);
@@ -65,6 +73,14 @@ QSurfaceDataArray *surfaceDataFromNp(double xStart, double deltaX, double zStart
populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
reinterpret_cast<const unsigned *>(view.data), result);
break;
+ case Shiboken::Numpy::View::Int64:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const int64_t *>(view.data), result);
+ break;
+ case Shiboken::Numpy::View::Unsigned64:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const uint64_t *>(view.data), result);
+ break;
case Shiboken::Numpy::View::Float:
populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
reinterpret_cast<const float *>(view.data), result);
diff --git a/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml b/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml
index fbf4aae9c..70014e3dc 100644
--- a/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml
+++ b/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtDataVisualization">
+<typesystem package="PySide6.QtDataVisualization"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<extra-includes>
<include file-name="qtdatavisualization_helper.h" location="global"/>
@@ -55,13 +56,50 @@
</object-type>
<object-type name="QCategory3DAxis"/>
<object-type name="QLogValue3DAxisFormatter"/>
- <object-type name="QValue3DAxis"/>
+ <object-type name="QValue3DAxis">
+ <modify-function signature="setFormatter(QValue3DAxisFormatter *)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<object-type name="QValue3DAxisFormatter">
+ <inject-code class="native" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="qvalue3daxisformatter-friend"/>
+ <modify-function signature="createNewInstance() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
<modify-function signature="populateCopy(QValue3DAxisFormatter&amp;)const">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
+ <!-- PYSIDE-2025: gridPositions(), labelPositions(), labelStrings() return
+ non-const-references to lists for modifications. Add setters for them. -->
+ <add-function signature="setGridPositions(const QList&lt;float&gt;&amp;@grid_positions@)">
+ <inject-documentation format="target" mode="append">
+ Sets the normalized grid line positions to ``grid_positions``.
+ </inject-documentation>
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="qvalue3daxisformatter-setgridpositions"/>
+ </add-function>
+ <add-function signature="setLabelPositions(const QList&lt;float&gt;&amp;@label_positions@)">
+ <inject-documentation format="target" mode="append">
+ Sets the normalized label positions to ``label_positions``.
+ </inject-documentation>
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="qvalue3daxisformatter-setlabelpositions"/>
+ </add-function>
+ <add-function signature="setLabelStrings(const QStringList&amp;@label_strings@)">
+ <inject-documentation format="target" mode="append">
+ Sets the label strings to ``label_strings``.
+ </inject-documentation>
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="qvalue3daxisformatter-setlabelstrings"/>
+ </add-function>
</object-type>
<object-type name="QAbstract3DSeries">
<enum-type name="Mesh"/>
@@ -79,11 +117,17 @@
</object-type>
<value-type name="QBarDataItem"/>
<object-type name="QBarDataProxy">
- <modify-function signature="resetArray(QBarDataArray*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
+ <modify-function signature="resetArray(QBarDataArray*)" remove="all"/>
+ <add-function signature="resetArray(const QBarDataArray&amp;)">
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="dataproxy-resetarray"/>
+ </add-function>
+ <modify-function signature="resetArray(QBarDataArray*,const QStringList&amp;,const QStringList&amp;)"
+ remove="all"/>
+ <add-function signature="resetArray(const QBarDataArray&amp;,const QStringList&amp;,const QStringList&amp;)">
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="dataproxy-resetarray2"/>
+ </add-function>
<modify-function signature="resetArray(QBarDataArray*,const QStringList&amp;,const QStringList&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -183,11 +227,12 @@
</object-type>
<value-type name="QScatterDataItem"/>
<object-type name="QScatterDataProxy">
- <modify-function signature="resetArray(QList&lt;QScatterDataItem&gt;*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
+ <modify-function signature="resetArray(QList&lt;QScatterDataItem&gt;*)"
+ remove="all"/>
+ <add-function signature="resetArray(QList&lt;QScatterDataItem&gt;*)">
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="scatterdataproxy-resetarray"/>
+ </add-function>
<modify-function signature="addItem(const QScatterDataItem&amp;)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -234,11 +279,10 @@
</object-type>
<value-type name="QSurfaceDataItem"/>
<object-type name="QSurfaceDataProxy">
- <extra-includes>
- <include file-name="sbknumpycheck.h" location="global"/>
- <include file-name="qtdatavisualization_helper.h" location="global"/>
- </extra-includes>
-
+ <inject-code class="native" position="beginning">
+ #include &lt;sbknumpycheck.h&gt;
+ #include &lt;qtdatavisualization_helper.h&gt;
+ </inject-code>
<!-- PYSIDE-1438: Replace all add/set/insertRow() taking a 'QList*' by overloads
taking 'const QList &' since an allocated list needs to be passed. -->
<modify-function signature="addRow(QList&lt;QSurfaceDataItem&gt;*)" remove="all"/>
@@ -425,4 +469,8 @@
<extra-includes>
<include file-name="qutils.h" location="global"/>
</extra-includes>
+
+ <!-- QtQml/QtNetwork are pulled in via QtDataVisualizationDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls)|(Qml).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtDesigner/CMakeLists.txt b/sources/pyside6/PySide6/QtDesigner/CMakeLists.txt
index f8a57834b..e91532b87 100644
--- a/sources/pyside6/PySide6/QtDesigner/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtDesigner/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtDesigner)
qt_wrap_cpp(QtDesigner_static_src "${pyside6_SOURCE_DIR}/qpydesignerextensions.h")
@@ -48,14 +51,11 @@ set(QtDesigner_include_dirs ${QtDesigner_SOURCE_DIR}
${QtDesigner_BINARY_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
+ ${QtWidgets_GEN_DIR})
+
set(QtDesigner_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Designer_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}Designer_LIBRARIES})
+
set(QtDesigner_deps QtWidgets)
create_pyside_module(NAME QtDesigner
diff --git a/sources/pyside6/PySide6/QtDesigner/qpydesignercustomwidgetcollection.cpp b/sources/pyside6/PySide6/QtDesigner/qpydesignercustomwidgetcollection.cpp
index 22b76e131..31f8ec152 100644
--- a/sources/pyside6/PySide6/QtDesigner/qpydesignercustomwidgetcollection.cpp
+++ b/sources/pyside6/PySide6/QtDesigner/qpydesignercustomwidgetcollection.cpp
@@ -9,6 +9,8 @@
#include <shiboken.h>
#include <bindingmanager.h>
+QT_BEGIN_NAMESPACE
+
static QString pyStringToQString(PyObject *s)
{
const char *utf8 = _PepUnicode_AsString(s);
@@ -217,3 +219,5 @@ void QPyDesignerCustomWidgetCollection::addCustomWidget(QDesignerCustomWidgetInt
{
instance()->m_customWidgets.append(c);
}
+
+QT_END_NAMESPACE
diff --git a/sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml b/sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml
index 22d7a7652..7d37cbddf 100644
--- a/sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml
+++ b/sources/pyside6/PySide6/QtDesigner/typesystem_designer.xml
@@ -3,8 +3,12 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtDesigner">
+<typesystem package="PySide6.QtDesigner"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+ <rejection class="qdesigner_internal"/>
+
<object-type name="QAbstractExtensionFactory"/>
<object-type name="QAbstractExtensionManager"/>
<object-type name="QAbstractFormBuilder"/>
diff --git a/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt b/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt
new file mode 100644
index 000000000..59cef220b
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGraphs/CMakeLists.txt
@@ -0,0 +1,100 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+project(QtGraphs)
+
+set(QtGraphs_DROPPED_ENTRIES)
+
+list(APPEND QtGraphs_src "${QtGraphs_SOURCE_DIR}/qtgraphs_helper.cpp")
+
+set(QtGraphs_SRC
+# 3D
+${QtGraphs_GEN_DIR}/qabstract3daxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qcategory3daxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qlogvalue3daxisformatter_wrapper.cpp
+${QtGraphs_GEN_DIR}/qvalue3daxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qvalue3daxisformatter_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstract3dseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstractdataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qbar3dseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qbardataitem_wrapper.cpp
+${QtGraphs_GEN_DIR}/qbardataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qcustom3ditem_wrapper.cpp
+${QtGraphs_GEN_DIR}/qcustom3dlabel_wrapper.cpp
+${QtGraphs_GEN_DIR}/qcustom3dvolume_wrapper.cpp
+${QtGraphs_GEN_DIR}/qheightmapsurfacedataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qitemmodelbardataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qitemmodelscatterdataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qitemmodelsurfacedataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qscatter3dseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qscatterdataitem_wrapper.cpp
+${QtGraphs_GEN_DIR}/qscatterdataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/qsurface3dseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qsurfacedataitem_wrapper.cpp
+${QtGraphs_GEN_DIR}/qsurfacedataproxy_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dbars_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dscatter_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dscene_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dsurface_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstract3dgraph_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dinputhandler_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstract3dinputhandler_wrapper.cpp
+${QtGraphs_GEN_DIR}/qtouch3dinputhandler_wrapper.cpp
+${QtGraphs_GEN_DIR}/q3dtheme_wrapper.cpp
+# 2D
+${QtGraphs_GEN_DIR}/qbarcategoryaxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstractaxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qvalueaxis_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstractbarseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qbarseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qbarset_wrapper.cpp
+${QtGraphs_GEN_DIR}/qlineseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qabstractseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qscatterseries_wrapper.cpp
+${QtGraphs_GEN_DIR}/qgraphtheme_wrapper.cpp
+${QtGraphs_GEN_DIR}/qseriestheme_wrapper.cpp
+${QtGraphs_GEN_DIR}/qxyseries_wrapper.cpp
+# module is always needed
+${QtGraphs_GEN_DIR}/qtgraphs_module_wrapper.cpp
+)
+
+set(QtGraphs_include_dirs ${QtGraphs_SOURCE_DIR}
+ ${QtGraphs_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}QtNetwork_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}QuickWidgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Graphs_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick3D_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuick_GEN_DIR}
+ ${QtQuickWidgets_GEN_DIR}
+ ${QtQuick3D_GEN_DIR})
+
+set(QtGraphs_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Graphs_LIBRARIES})
+
+set(QtGraphs_deps QtCore QtNetwork QtGui QtWidgets QtQml QtQuick QtQuickWidgets QtQuick3D)
+
+check_qt_opengl("Graphs" QtGraphs_include_dirs QtGraphs_deps
+ QtGraphs_DROPPED_ENTRIES)
+
+create_pyside_module(NAME QtGraphs
+ INCLUDE_DIRS QtGraphs_include_dirs
+ LIBRARIES QtGraphs_libraries
+ DEPS QtGraphs_deps
+ TYPESYSTEM_PATH QtGraphs_SOURCE_DIR
+ SOURCES QtGraphs_SRC
+ STATIC_SOURCES QtGraphs_src
+ DROPPED_ENTRIES QtGraphs_DROPPED_ENTRIES)
+
+install(FILES ${pyside6_SOURCE_DIR}/qtgraphs_helper.h
+ DESTINATION include/PySide6/QtGraphs)
diff --git a/sources/pyside6/PySide6/QtGraphs/qtgraphs_helper.cpp b/sources/pyside6/PySide6/QtGraphs/qtgraphs_helper.cpp
new file mode 100644
index 000000000..19fe4f818
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGraphs/qtgraphs_helper.cpp
@@ -0,0 +1,97 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "qtgraphs_helper.h"
+
+#include <sbknumpyview.h>
+
+#include <QtCore/QDebug>
+
+namespace QtGraphsHelper {
+
+template <class T>
+static void populateArray(double xStart, double deltaX, double zStart, double deltaZ,
+ qsizetype xSize, qsizetype zSize, qsizetype zStrideBytes,
+ const T *data, QSurfaceDataArray *result)
+{
+ result->reserve(zSize);
+ const qsizetype zStride = zStrideBytes / sizeof(T);
+ double z = zStart;
+ for (qsizetype zi = 0; zi < zSize; ++zi) {
+ QSurfaceDataRow row;
+ row.reserve(xSize);
+
+ double x = xStart;
+ auto *rowDataEnd = data + xSize;
+ for (auto *d = data; d < rowDataEnd; ++d) {
+ row.append(QSurfaceDataItem(QVector3D(x, *d, z)));
+ x += deltaX;
+ }
+ result->append(row);
+
+ data += zStride;
+ z += deltaZ;
+ }
+}
+
+QSurfaceDataArray surfaceDataFromNp(double xStart, double deltaX, double zStart, double deltaZ,
+ PyObject *pyData)
+{
+ static const char funcName[] = "QSurfaceDataProxy.resetArrayNp";
+
+ QSurfaceDataArray result;
+
+ auto view = Shiboken::Numpy::View::fromPyObject(pyData);
+ if (!view) {
+ PyErr_Format(PyExc_TypeError, "Invalid array passed to %s", funcName);
+ return result;
+ }
+ if (view.ndim != 2) {
+ PyErr_Format(PyExc_TypeError, "%s expects a 2 dimensional array (%d)", view.ndim);
+ return result;
+ }
+
+ const qsizetype zSize = view.dimensions[0];
+ const qsizetype xSize = view.dimensions[1];
+ if (zSize == 0 || xSize == 0)
+ return result;
+
+ switch (view.type) {
+ case Shiboken::Numpy::View::Int16:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const int16_t *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Unsigned16:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const uint16_t *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Int:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const int *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Unsigned:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const unsigned *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Int64:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const int64_t *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Unsigned64:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const uint64_t *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Float:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const float *>(view.data), &result);
+ break;
+ case Shiboken::Numpy::View::Double:
+ populateArray(xStart, deltaX, zStart, deltaZ, xSize, zSize, view.stride[0],
+ reinterpret_cast<const double *>(view.data), &result);
+
+ break;
+ }
+ return result;
+}
+
+} // namespace QtGraphsHelper
diff --git a/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml b/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml
new file mode 100644
index 000000000..43e4458be
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtGraphs"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
+
+ <extra-includes>
+ <include file-name="qtgraphs_helper.h" location="global"/>
+ </extra-includes>
+
+ <load-typesystem name="templates/datavisualization_common.xml" generate="no" />
+ <load-typesystem name="QtQuickWidgets/typesystem_quickwidgets.xml" generate="no" />
+
+ <function signature="qDefaultSurfaceFormat(bool)"/>
+
+
+ <object-type name="QAbstract3DAxis">
+ <enum-type name="AxisOrientation"/>
+ <enum-type name="AxisType"/>
+ </object-type>
+ <object-type name="QCategory3DAxis"/>
+ <object-type name="QLogValue3DAxisFormatter"/>
+ <object-type name="QValue3DAxis">
+ <modify-function signature="setFormatter(QValue3DAxisFormatter *)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QValue3DAxisFormatter">
+ <modify-function signature="createNewInstance() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstract3DSeries">
+ <enum-type name="Mesh"/>
+ <enum-type name="SeriesType"/>
+ </object-type>
+ <object-type name="QAbstractDataProxy">
+ <enum-type name="DataType"/>
+ </object-type>
+ <object-type name="QBar3DSeries">
+ <modify-function signature="setDataProxy(QBarDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QBarDataItem"/>
+ <object-type name="QBarDataProxy">
+ </object-type>
+ <object-type name="QCustom3DItem"/>
+ <object-type name="QCustom3DLabel"/>
+ <object-type name="QCustom3DVolume">
+ <modify-function signature="setTextureData(QList&lt;uchar&gt;*)" remove="all"/>
+ <add-function signature="setTextureData(const QList&lt;uchar&gt;&amp;)">
+ <inject-code class="target" position="beginning" file="../glue/qtdatavisualization.cpp"
+ snippet="qcustom3dvolume-settexturedata"/>
+ </add-function>
+ </object-type>
+ <object-type name="QHeightMapSurfaceDataProxy"/>
+ <object-type name="QItemModelBarDataProxy">
+ <enum-type name="MultiMatchBehavior"/>
+ </object-type>
+ <object-type name="QItemModelScatterDataProxy"/>
+ <object-type name="QItemModelSurfaceDataProxy">
+ <enum-type name="MultiMatchBehavior"/>
+ </object-type>
+ <object-type name="QScatter3DSeries">
+ <modify-function signature="setDataProxy(QScatterDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QScatterDataItem"/>
+ <object-type name="QScatterDataProxy">
+ </object-type>
+ <object-type name="QSurface3DSeries">
+ <enum-type name="DrawFlag" flags="DrawFlags"/>
+ <modify-function signature="QSurface3DSeries(QSurfaceDataProxy*,QObject*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setDataProxy(QSurfaceDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QSurfaceDataItem"/>
+ <object-type name="QSurfaceDataProxy">
+ <inject-code class="native" position="beginning">
+ #include &lt;sbknumpycheck.h&gt;
+ #include &lt;qtgraphs_helper.h&gt;
+ </inject-code>
+ <add-function signature="resetArrayNp(double@x@,double@deltaX@,double@z@,double@deltaZ@,PyArrayObject*@data@)">
+ <inject-code file="../glue/qtgraphs.cpp"
+ snippet="graphs-qsurfacedataproxy-resetarraynp"/>
+ <inject-documentation format="target" mode="append">
+ Populates the data from a 2 dimensional numpy array containing the y
+ values for a range starting a ``x``, ``z`` with steps of ``deltaX``,
+ ``deltaZ``, respectively.
+ </inject-documentation>
+ </add-function>
+
+ </object-type>
+ <object-type name="Q3DBars">
+ <modify-function signature="addAxis(QAbstract3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QAbstract3DAxis*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="setColumnAxis(QCategory3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRowAxis(QCategory3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="Q3DScatter">
+ <modify-function signature="addAxis(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QValue3DAxis*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="setAxisX(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisY(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisZ(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="Q3DScene"/>
+ <object-type name="Q3DSurface">
+ <modify-function signature="addAxis(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QValue3DAxis*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="setAxisX(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisY(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisZ(QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstract3DGraph">
+ <enum-type name="ElementType"/>
+ <enum-type name="OptimizationHint" flags="OptimizationHints"/>
+ <enum-type name="RenderingMode"/>
+ <enum-type name="SelectionFlag" flags="SelectionFlags"/>
+ <enum-type name="ShadowQuality"/>
+ <enum-type name="CameraPreset" since="6.7"/>
+ <modify-function signature="addCustomItem(QCustom3DItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addInputHandler(QAbstract3DInputHandler*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addTheme(Q3DTheme*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseCustomItem(QCustom3DItem*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="releaseInputHandler(QAbstract3DInputHandler*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="releaseTheme(Q3DTheme*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtdatavisualization.cpp" snippet="releaseownership"/>
+ </modify-function>
+ <modify-function signature="setActiveInputHandler(QAbstract3DInputHandler*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setActiveTheme(Q3DTheme*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="Q3DInputHandler"/>
+ <object-type name="QAbstract3DInputHandler">
+ <enum-type name="InputView"/>
+ </object-type>
+ <object-type name="QTouch3DInputHandler"/>
+ <object-type name="Q3DTheme">
+ <enum-type name="ColorStyle"/>
+ <enum-type name="Theme"/>
+ </object-type>
+
+ <!-- 2D -->
+ <object-type name="QBarCategoryAxis"/>
+ <object-type name="QAbstractAxis">
+ <enum-type name="AxisType"/>
+ </object-type>
+ <object-type name="QValueAxis"/>
+ <object-type name="QAbstractBarSeries">
+ <enum-type name="LabelsPosition"/>
+ <modify-function signature="append(QBarSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="append(QList&lt;QBarSet*&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insert(int,QBarSet*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="take(QBarSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QBarSeries"/>
+ <object-type name="QBarSet"/>
+ <object-type name="QLineSeries"/>
+ <object-type name="QAbstractSeries">
+ <enum-type name="SeriesType"/>
+ </object-type>
+ <object-type name="QScatterSeries"/>
+ <object-type name="QGraphTheme">
+ <enum-type name="ColorTheme"/>
+ </object-type>
+ <object-type name="QSeriesTheme">
+ <enum-type name="SeriesColorTheme"/>
+ </object-type>
+ <object-type name="QXYSeries">
+ </object-type>
+
+ <extra-includes>
+ <include file-name="qutils.h" location="global"/>
+ </extra-includes>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/CMakeLists.txt b/sources/pyside6/PySide6/QtGui/CMakeLists.txt
index 2c95c71af..7cd7871f3 100644
--- a/sources/pyside6/PySide6/QtGui/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtGui/CMakeLists.txt
@@ -1,10 +1,84 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtGui)
qt_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside6_SOURCE_DIR}/qpytextobject.h")
set(QtGui_DROPPED_ENTRIES)
+# Exclude sources that have clashing static helper functions named "iterator_..."
+set(QtGui_SRC_UNITY_EXCLUDED_SRC
+ ${QtGui_GEN_DIR}/qtextframe_iterator_wrapper.cpp
+ ${QtGui_GEN_DIR}/qtextblock_iterator_wrapper.cpp
+ ${QtGui_GEN_DIR}/qshaderversion_wrapper.cpp
+)
+
+set_property(SOURCE ${QtGui_SRC_UNITY_EXCLUDED_SRC}
+ PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
+
+set(QtGui_SRC_RHI
+${QtGui_GEN_DIR}/qrhi_wrapper.cpp
+${QtGui_GEN_DIR}/qrhibuffer_wrapper.cpp
+${QtGui_GEN_DIR}/qrhicolorattachment_wrapper.cpp
+${QtGui_GEN_DIR}/qrhicommandbuffer_wrapper.cpp
+${QtGui_GEN_DIR}/qrhicomputepipeline_wrapper.cpp
+${QtGui_GEN_DIR}/qrhidepthstencilclearvalue_wrapper.cpp
+${QtGui_GEN_DIR}/qrhidriverinfo_wrapper.cpp
+${QtGui_GEN_DIR}/qrhigraphicspipeline_targetblend_wrapper.cpp
+${QtGui_GEN_DIR}/qrhigraphicspipeline_wrapper.cpp
+${QtGui_GEN_DIR}/qrhigraphicspipeline_stencilopstate_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiinitparams_wrapper.cpp
+${QtGui_GEN_DIR}/qrhinativehandles_wrapper.cpp
+${QtGui_GEN_DIR}/qrhinullinitparams_wrapper.cpp
+${QtGui_GEN_DIR}/qrhireadbackdescription_wrapper.cpp
+${QtGui_GEN_DIR}/qrhireadbackresult_wrapper.cpp
+${QtGui_GEN_DIR}/qrhirenderbuffer_wrapper.cpp
+${QtGui_GEN_DIR}/qrhirenderpassdescriptor_wrapper.cpp
+${QtGui_GEN_DIR}/qrhirendertarget_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiresource_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiresourceupdatebatch_wrapper.cpp
+${QtGui_GEN_DIR}/qrhisampler_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiscissor_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebinding_textureandsampler_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebinding_data_storagebufferdata_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebinding_data_storageimagedata_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebinding_data_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebinding_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderresourcebindings_wrapper.cpp
+${QtGui_GEN_DIR}/qrhishaderstage_wrapper.cpp
+${QtGui_GEN_DIR}/qrhistats_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiswapchain_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiswapchainrendertarget_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitexture_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitexturecopydescription_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitexturerendertarget_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitexturerendertargetdescription_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitexturesubresourceuploaddescription_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitextureuploaddescription_wrapper.cpp
+${QtGui_GEN_DIR}/qrhitextureuploadentry_wrapper.cpp
+${QtGui_GEN_DIR}/qrhivertexinputattribute_wrapper.cpp
+${QtGui_GEN_DIR}/qrhivertexinputbinding_wrapper.cpp
+${QtGui_GEN_DIR}/qrhivertexinputlayout_wrapper.cpp
+${QtGui_GEN_DIR}/qrhiviewport_wrapper.cpp
+${QtGui_GEN_DIR}/qshader_wrapper.cpp
+${QtGui_GEN_DIR}/qshadercode_wrapper.cpp
+${QtGui_GEN_DIR}/qshaderkey_wrapper.cpp
+)
+
+if (ENABLE_WIN)
+ list(APPEND QtGui_SRC_RHI
+ ${QtGui_GEN_DIR}/qrhid3d11initparams_wrapper.cpp
+ ${QtGui_GEN_DIR}/qrhid3d11nativehandles_wrapper.cpp
+ ${QtGui_GEN_DIR}/qrhid3d12initparams_wrapper.cpp
+ ${QtGui_GEN_DIR}/qrhid3d12nativehandles_wrapper.cpp)
+elseif (ENABLE_MAC)
+ list(APPEND QtGui_SRC_RHI
+ ${QtGui_GEN_DIR}/qrhimetalinitparams_wrapper.cpp)
+endif()
+
set(QtGui_SRC
+${QtGui_SRC_UNITY_EXCLUDED_SRC}
${QtGui_GEN_DIR}/qabstractfileiconprovider_wrapper.cpp
${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp
@@ -31,6 +105,7 @@ ${QtGui_GEN_DIR}/qactiongroup_wrapper.cpp
${QtGui_GEN_DIR}/qbackingstore_wrapper.cpp
${QtGui_GEN_DIR}/qbitmap_wrapper.cpp
${QtGui_GEN_DIR}/qbrush_wrapper.cpp
+${QtGui_GEN_DIR}/qchildwindowevent_wrapper.cpp
${QtGui_GEN_DIR}/qclipboard_wrapper.cpp
${QtGui_GEN_DIR}/qcloseevent_wrapper.cpp
${QtGui_GEN_DIR}/qcolor_wrapper.cpp
@@ -54,6 +129,7 @@ ${QtGui_GEN_DIR}/qexposeevent_wrapper.cpp
${QtGui_GEN_DIR}/qfileopenevent_wrapper.cpp
${QtGui_GEN_DIR}/qfocusevent_wrapper.cpp
${QtGui_GEN_DIR}/qfont_wrapper.cpp
+${QtGui_GEN_DIR}/qfont_tag_wrapper.cpp
${QtGui_GEN_DIR}/qfontdatabase_wrapper.cpp
${QtGui_GEN_DIR}/qfontinfo_wrapper.cpp
${QtGui_GEN_DIR}/qfontmetrics_wrapper.cpp
@@ -95,10 +171,8 @@ ${QtGui_GEN_DIR}/qmouseevent_wrapper.cpp
${QtGui_GEN_DIR}/qmoveevent_wrapper.cpp
${QtGui_GEN_DIR}/qmovie_wrapper.cpp
${QtGui_GEN_DIR}/qnativegestureevent_wrapper.cpp
+${QtGui_GEN_DIR}/qnativeinterface_wrapper.cpp
${QtGui_GEN_DIR}/qoffscreensurface_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglcontextgroup_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglextrafunctions_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglfunctions_wrapper.cpp
${QtGui_GEN_DIR}/qpagedpaintdevice_wrapper.cpp
${QtGui_GEN_DIR}/qpagelayout_wrapper.cpp
${QtGui_GEN_DIR}/qpageranges_wrapper.cpp
@@ -142,13 +216,13 @@ ${QtGui_GEN_DIR}/qsinglepointevent_wrapper.cpp
${QtGui_GEN_DIR}/qstandarditem_wrapper.cpp
${QtGui_GEN_DIR}/qstandarditemmodel_wrapper.cpp
${QtGui_GEN_DIR}/qstatustipevent_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglcontext_wrapper.cpp
${QtGui_GEN_DIR}/qaccessible_state_wrapper.cpp
${QtGui_GEN_DIR}/qaccessibleinterface_wrapper.cpp
${QtGui_GEN_DIR}/qscreen_wrapper.cpp
${QtGui_GEN_DIR}/qshortcut_wrapper.cpp
${QtGui_GEN_DIR}/qrasterwindow_wrapper.cpp
${QtGui_GEN_DIR}/qrawfont_wrapper.cpp
+${QtGui_SRC_RHI}
${QtGui_GEN_DIR}/qscrollevent_wrapper.cpp
${QtGui_GEN_DIR}/qscrollprepareevent_wrapper.cpp
${QtGui_GEN_DIR}/qstatictext_wrapper.cpp
@@ -157,7 +231,6 @@ ${QtGui_GEN_DIR}/qsurface_wrapper.cpp
${QtGui_GEN_DIR}/qsurfaceformat_wrapper.cpp
${QtGui_GEN_DIR}/qsyntaxhighlighter_wrapper.cpp
${QtGui_GEN_DIR}/qtabletevent_wrapper.cpp
-${QtGui_GEN_DIR}/qtextblock_iterator_wrapper.cpp
${QtGui_GEN_DIR}/qtextblock_wrapper.cpp
${QtGui_GEN_DIR}/qtextblockformat_wrapper.cpp
${QtGui_GEN_DIR}/qtextblockgroup_wrapper.cpp
@@ -169,7 +242,6 @@ ${QtGui_GEN_DIR}/qtextdocumentfragment_wrapper.cpp
${QtGui_GEN_DIR}/qtextdocumentwriter_wrapper.cpp
${QtGui_GEN_DIR}/qtextformat_wrapper.cpp
${QtGui_GEN_DIR}/qtextfragment_wrapper.cpp
-${QtGui_GEN_DIR}/qtextframe_iterator_wrapper.cpp
${QtGui_GEN_DIR}/qtextframe_wrapper.cpp
${QtGui_GEN_DIR}/qtextframeformat_wrapper.cpp
${QtGui_GEN_DIR}/qtextimageformat_wrapper.cpp
@@ -209,6 +281,37 @@ ${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp
${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp
)
+get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
+ PROPERTY QT_ENABLED_PUBLIC_FEATURES)
+
+if("xcb" IN_LIST QtGui_enabled_features)
+ list(APPEND QtGui_SRC
+ ${QtGui_GEN_DIR}/qnativeinterface_qx11application_wrapper.cpp)
+elseif(WIN32)
+ list(APPEND QtGui_SRC
+ ${QtGui_GEN_DIR}/qnativeinterface_qwindowsscreen_wrapper.cpp)
+endif()
+
+if("opengl" IN_LIST QtGui_enabled_features OR "opengles2" IN_LIST QtGui_enabled_features
+ OR "opengles3" IN_LIST QtGui_enabled_features)
+ list(APPEND QtGui_SRC
+ ${QtGui_GEN_DIR}/qopenglcontextgroup_wrapper.cpp
+ ${QtGui_GEN_DIR}/qopenglextrafunctions_wrapper.cpp
+ ${QtGui_GEN_DIR}/qopenglfunctions_wrapper.cpp
+ ${QtGui_GEN_DIR}/qopenglcontext_wrapper.cpp
+ ${QtGui_GEN_DIR}/qrhigles2initparams_wrapper.cpp
+ ${QtGui_GEN_DIR}/qrhigles2nativehandles_wrapper.cpp)
+else()
+ list(APPEND QtGui_DROPPED_ENTRIES
+ QOpenGLContext QOpenGLContextGroup QOpenGLPaintDevice
+ QOpenGLExtraFunctions QOpenGLFunctions
+ QRhiGles2InitParams QRhiGles2NativeHandles)
+endif()
+
+set(QtGui_private_include_dirs
+ ${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
+
configure_file("${QtGui_SOURCE_DIR}/QtGui_global.post.h.in"
"${QtGui_BINARY_DIR}/QtGui_global.post.h" @ONLY)
@@ -217,6 +320,7 @@ set(QtGui_include_dirs ${QtGui_SOURCE_DIR}
${pyside6_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${QtGui_private_include_dirs}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
)
@@ -232,7 +336,8 @@ create_pyside_module(NAME QtGui
SOURCES QtGui_SRC
STATIC_SOURCES QPYTEXTOBJECT_MOC
TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
- DROPPED_ENTRIES QtGui_DROPPED_ENTRIES)
+ DROPPED_ENTRIES QtGui_DROPPED_ENTRIES
+ ADDITIONAL_INCLUDE_DIRS QtGui_private_include_dirs)
install(FILES ${pyside6_SOURCE_DIR}/qpytextobject.h
${pyside6_SOURCE_DIR}/qtguihelper.h
diff --git a/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in b/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in
index deb7cf805..e5a0eeb90 100644
--- a/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in
+++ b/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in
@@ -1,2 +1,6 @@
#include "qpytextobject.h" // PySide class
+#include <rhi/qrhi.h>
+#include <rhi/qrhi_platform.h>
+#include <rhi/qshader.h>
#include <qtguihelper.h>
+void qt_set_sequence_auto_mnemonic(bool b);
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui.xml
index 727bee0bf..858989404 100644
--- a/sources/pyside6/PySide6/QtGui/typesystem_gui.xml
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtGui">
+<typesystem package="PySide6.QtGui"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<?if windows?>
<load-typesystem name="QtGui/typesystem_gui_win.xml" generate="yes"/>
@@ -15,4 +16,5 @@
<load-typesystem name="QtGui/typesystem_gui_x11.xml" generate="yes"/>
<?endif?>
<load-typesystem name="QtGui/typesystem_gui_common.xml" generate="yes"/>
+ <load-typesystem name="QtGui/typesystem_gui_rhi.xml" generate="yes"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml
index d356034ec..dd17952f0 100644
--- a/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml
@@ -10,26 +10,6 @@
<load-typesystem name="templates/gui_common.xml" generate="no"/>
<load-typesystem name="templates/opengl_common.xml" generate="no"/>
- <?if !darwin?>
- <?entity GLint int?>
- <?entity GLuint unsigned int?>
- <?entity GLbyte unsigned char?>
- <?entity GLboolean unsigned char?>
- <?entity GLsizei int?>
- <?entity GLsizeiptr long?>
- <?entity GLintptr long?>
- <?endif?>
-
- <?if darwin?>
- <?entity GLint int32_t?>
- <?entity GLuint uint32_t?>
- <?entity GLbyte uint8_t?>
- <?entity GLboolean uint8_t?>
- <?entity GLsizei int32_t?>
- <?entity GLsizeiptr intptr_t?>
- <?entity GLintptr intptr_t?>
- <?endif?>
-
<rejection class="^Q.*$" argument-type="^QPlatform.*$"/>
<function signature="qAlpha(uint)"/>
<function signature="qBlue(uint)"/>
@@ -60,33 +40,9 @@
<function signature="qPixelFormatHsl(uchar,uchar,QPixelFormat::AlphaUsage,QPixelFormat::AlphaPosition,QPixelFormat::TypeInterpretation)"/>
<function signature="qPixelFormatHsv(uchar,uchar,QPixelFormat::AlphaUsage,QPixelFormat::AlphaPosition,QPixelFormat::TypeInterpretation)"/>
<function signature="qPixelFormatYuv(QPixelFormat::YUVLayout,uchar,QPixelFormat::AlphaUsage,QPixelFormat::AlphaPosition,QPixelFormat::AlphaPremultiplied,QPixelFormat::TypeInterpretation,QPixelFormat::ByteOrder)"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QStyleFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QInputContextFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsItem*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsLayout*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleBridgeFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QImageIOHandlerFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QTextObjectInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsLayoutItem*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QIconEngineFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QPictureFormatInterface*&gt;"/>
-
- <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayout*&gt;"/>
- <rejection class="*" function-name="qobject_cast&lt;QGraphicsItem*&gt;"/>
- <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayoutItem*&gt;"/>
- <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayoutItem*&gt;"/>
-
- <rejection class="*" function-name="qGenericMatrixFromMatrix4x4"/>
- <rejection class="*" function-name="qDrawBorderPixmap"/>
- <rejection class="*" function-name="qDrawPixmaps"/>
- <rejection class="*" function-name="qGenericMatrixToMatrix4x4"/>
-
- <rejection class="*" function-name="d_func"/>
- <rejection class="*" field-name="d_ptr"/>
- <rejection class="*" field-name="d"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?GLboolean ?\*$"/>
+ <function signature="qt_set_sequence_auto_mnemonic(bool)"/>
+
+ <rejection class="^QOpenGL.*$" argument-type="^const GLboolean ?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
@@ -104,8 +60,6 @@
<rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
- <rejection class="QDrawBorderPixmap"/>
-
<!--
Event classes have a lot of non-documented protected fields, those fields
are removed from PySide because they are Qt implementation details,
@@ -113,21 +67,17 @@
-->
<rejection class="^Q.*Event$" field-name="^m_.*$"/>
- <rejection class="QEventPoint" field-name="^m_.*$"/>
- <rejection class="QAbstractTextDocumentLayout::PaintContext" field-name="selections"/>
- <rejection class="QBrush" function-name="cleanUp"/>
<rejection class="QFont" enum-name="ResolveProperties"/>
- <rejection class="QMotifStyle" field-name="focus"/>
- <rejection class="QPictureIO" function-name="defineIOHandler"/>
<rejection class="QPolygon" function-name="putPoints"/>
<rejection class="QPolygon" function-name="setPoints"/>
<rejection class="QPolygon" function-name="setPoint"/>
- <rejection class="QPolygon" function-name="points"/>
<rejection class="QPolygon" function-name="point"/>
- <rejection class="QActionGroup" function-name="selected"/>
<rejection class="QPaintEngine" function-name="fix_neg_rect"/>
+ <inject-code class="native" position="beginning" file="../glue/qtgui.cpp"
+ snippet="gui-declarations"/>
+
<!-- For Qt::mightBeRichText(QString), Qt::convertFromPlainText(QString,Qt::WhiteSpaceMode)
Match on files from '/QtGui/' (shadow build) or '/gui/' (developer build)
or '/QtGui.framework' (macOS) -->
@@ -142,7 +92,7 @@
</conversion-rule>
</primitive-type>
- <object-type name="QAbstractFileIconProvider" since="6.0">
+ <object-type name="QAbstractFileIconProvider">
<enum-type name="IconType"/>
<enum-type name="Option" flags="Options"/>
</object-type>
@@ -176,17 +126,26 @@
<object-type name="QAccessibleTextInterface"/>
<object-type name="QAccessibleValueInterface"/>
- <object-type name="QAccessibleEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::InvalidEvent"/>
- <object-type name="QAccessibleStateChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::StateChanged"/>
- <object-type name="QAccessibleTableModelChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TableModelChanged">
+ <object-type name="QAccessibleEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::InvalidEvent"/>
+ <object-type name="QAccessibleStateChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::StateChanged"/>
+ <object-type name="QAccessibleTableModelChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TableModelChanged">
<enum-type name="ModelChangeType"/>
</object-type>
- <object-type name="QAccessibleTextCursorEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextCaretMoved"/>
- <object-type name="QAccessibleTextInsertEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextInserted"/>
- <object-type name="QAccessibleTextRemoveEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextRemoved"/>
- <object-type name="QAccessibleTextSelectionEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextSelectionChanged"/>
- <object-type name="QAccessibleTextUpdateEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextUpdated"/>
- <object-type name="QAccessibleValueChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::ValueChanged"/>
+ <object-type name="QAccessibleTextCursorEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TextCaretMoved"/>
+ <object-type name="QAccessibleTextInsertEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TextInserted"/>
+ <object-type name="QAccessibleTextRemoveEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TextRemoved"/>
+ <object-type name="QAccessibleTextSelectionEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TextSelectionChanged"/>
+ <object-type name="QAccessibleTextUpdateEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::TextUpdated"/>
+ <object-type name="QAccessibleValueChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QAccessible::ValueChanged"/>
<object-type name="QAction">
<enum-type name="ActionEvent"/>
@@ -207,7 +166,7 @@
</add-function>
</object-type>
<object-type name="QActionGroup">
- <enum-type name="ExclusionPolicy" since="5.14"/>
+ <enum-type name="ExclusionPolicy"/>
<modify-function signature="addAction(QAction*)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -276,7 +235,7 @@
<modify-argument index="1">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QTransform, bool]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -316,7 +275,8 @@
<value-type name="QTextInlineObject"/>
<value-type name="QTextDocumentFragment"/>
<value-type name="QTextOption">
- <enum-type name="Flag" flags="Flags"/>
+ <!-- PYSIDE-2088, Avoid MSVC signedness issues -->
+ <enum-type name="Flag" flags="Flags" cpp-type="unsigned"/>
<enum-type name="TabType"/>
<enum-type name="WrapMode"/>
<value-type name="Tab"/>
@@ -365,9 +325,7 @@
<enum-type name="StandardKey"/>
<add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="qkeysequence_repr"/>
- </inject-code>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qkeysequence-repr"/>
</add-function>
<add-function signature="__reduce__" return-type="PyObject*">
@@ -471,7 +429,7 @@
</value-type>
<value-type name="QTextBlockFormat">
<enum-type name="LineHeightTypes" since="4.8" revision="4800"/>
- <enum-type name="MarkerType" since="5.14"/>
+ <enum-type name="MarkerType"/>
</value-type>
<value-type name="QTextTableCellFormat"/>
<value-type name="QTextCharFormat" >
@@ -480,10 +438,10 @@
<enum-type name="VerticalAlignment"/>
</value-type>
<value-type name="QTextFormat" >
- <enum-type name="FormatType"/>
- <enum-type name="ObjectTypes"/>
+ <enum-type name="FormatType" python-type="IntEnum"/>
+ <enum-type name="ObjectTypes" python-type="IntEnum"/>
<enum-type name="PageBreakFlag" flags="PageBreakFlags"/>
- <enum-type name="Property"/>
+ <enum-type name="Property" python-type="IntEnum"/>
</value-type>
<value-type name="QTextListFormat">
<enum-type name="Style"/>
@@ -531,6 +489,7 @@
<value-type name="QIcon" >
<enum-type name="Mode"/>
<enum-type name="State"/>
+ <enum-type name="ThemeIcon" since="6.7"/>
<modify-function signature="QIcon(QIconEngine*)">
<modify-argument index="1">
<no-null-pointer/>
@@ -651,21 +610,22 @@
</modify-function>
</value-type>
- <value-type name="QConicalGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::ConicalGradient"/>
+ <value-type name="QConicalGradient" polymorphic-id-expression="%B-&gt;type() == QGradient::ConicalGradient"/>
<value-type name="QFontInfo"/>
- <value-type name="QRadialGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::RadialGradient"/>
+ <value-type name="QRadialGradient" polymorphic-id-expression="%B-&gt;type() == QGradient::RadialGradient"/>
<value-type name="QFont" >
<enum-type name="Capitalization"/>
<enum-type name="SpacingType"/>
- <enum-type name="Stretch"/>
+ <enum-type name="Stretch" python-type="IntEnum"/>
<enum-type name="Style"/>
<enum-type name="StyleHint"/>
- <enum-type name="StyleStrategy"/>
- <enum-type name="Weight"/>
+ <enum-type name="StyleStrategy" python-type="Flag"/>
+ <enum-type name="Weight" python-type="IntEnum"/>
<enum-type name="HintingPreference" since="4.8" revision="4800"/>
<extra-includes>
<include file-name="QStringList" location="global"/>
</extra-includes>
+ <value-type name="Tag" since="6.7"/>
<!-- PYSIDE-1685: QFont(QString) should be checked first, else it will be interpreted as sequence -->
<modify-function signature="QFont(const QString&amp;,int,int, bool)" overload-number="0"/>
<modify-function signature="QFont(const QStringList &amp;,int,int, bool)" overload-number="1"/>
@@ -721,7 +681,7 @@
</inject-code>
</modify-function>
- <modify-function signature="QImage(const QString&amp;, const char *)">
+ <modify-function signature="QImage(const QString&amp;, const char *)" allow-thread="yes">
<modify-argument index="1"><replace-type modified-type="PyPathLike"/></modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qfile-path-1"/>
</modify-function>
@@ -1044,18 +1004,18 @@
</modify-function>
</value-type>
- <namespace-type name="QColorConstants" since="5.14">
+ <namespace-type name="QColorConstants">
<extra-includes>
<include file-name="QColor" location="global"/>
</extra-includes>
- <namespace-type name="Svg" since="5.14">
+ <namespace-type name="Svg">
<extra-includes>
<include file-name="QColor" location="global"/>
</extra-includes>
</namespace-type>
</namespace-type>
- <value-type name="QColorSpace" since="5.14">
+ <value-type name="QColorSpace">
<enum-type name="NamedColorSpace"/>
<enum-type name="Primaries"/>
<enum-type name="TransferFunction"/>
@@ -1145,19 +1105,19 @@
<inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-size"/>
</modify-function>
</value-type>
- <value-type name="QGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::NoGradient">
+ <value-type name="QGradient" polymorphic-id-expression="%B-&gt;type() == QGradient::NoGradient">
<enum-type name="CoordinateMode"/>
<enum-type name="InterpolationMode"/>
- <enum-type name="Preset" since="5.12"/>
+ <enum-type name="Preset"/>
<enum-type name="Spread"/>
<enum-type name="Type"/>
</value-type>
- <value-type name="QLinearGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::LinearGradient"/>
+ <value-type name="QLinearGradient" polymorphic-id-expression="%B-&gt;type() == QGradient::LinearGradient"/>
<object-type name="QPaintDevice">
<enum-type name="PaintDeviceMetric"/>
</object-type>
<object-type name="QPagedPaintDevice">
- <enum-type name="PdfVersion" since="5.10"/>
+ <enum-type name="PdfVersion"/>
</object-type>
<object-type name="QAbstractTextDocumentLayout">
<value-type name="PaintContext" >
@@ -1298,9 +1258,6 @@
<define-ownership class="target" owner="target"/>
</modify-argument>
</modify-function>
-
- <!-- ??? -->
- <modify-function signature="operator&lt;(QStandardItem)const" remove="all"/>
</object-type>
<object-type name="QSyntaxHighlighter">
<modify-function signature="setCurrentBlockUserData(QTextBlockUserData*)">
@@ -1309,7 +1266,7 @@
</modify-argument>
</modify-function>
<modify-function signature="setDocument(QTextDocument*)">
- <modify-argument index="1">
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtGui.QTextDocument]">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
@@ -1356,37 +1313,38 @@
</modify-function>
</object-type>
- <object-type name="QActionEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ActionAdded || %1-&gt;type() == QEvent::ActionRemoved || %1-&gt;type() == QEvent::ActionChanged"/>
- <object-type name="QCloseEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Close"/>
- <object-type name="QContextMenuEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ContextMenu">
+ <object-type name="QActionEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ActionAdded || %B-&gt;type() == QEvent::ActionRemoved || %B-&gt;type() == QEvent::ActionChanged"/>
+ <object-type name="QCloseEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Close"/>
+ <object-type name="QContextMenuEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::ContextMenu">
<enum-type name="Reason"/>
</object-type>
- <value-type name="QEventPoint" since="6.0">
+ <value-type name="QEventPoint">
<enum-type name="State"/>
</value-type>
- <object-type name="QDragEnterEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragEnter">
+ <object-type name="QDragEnterEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::DragEnter">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QDragLeaveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragLeave">
+ <object-type name="QDragLeaveEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::DragLeave">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QDragMoveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragMove">
+ <object-type name="QDragMoveEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::DragMove">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QDropEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Drop">
+ <object-type name="QDropEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Drop">
<modify-function signature="source()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
@@ -1398,22 +1356,29 @@
</inject-code>
</add-function>
</object-type>
- <object-type name="QEnterEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Enter"/>
- <object-type name="QExposeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Expose"/>
- <object-type name="QFileOpenEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::FileOpen"/>
- <object-type name="QFocusEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::FocusIn || %1-&gt;type() == QEvent::FocusOut">
+ <object-type name="QChildWindowEvent" since="6.7"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ChildWindowAdded || %B-&gt;type() == QEvent::ChildWindowRemoved"/>
+ <object-type name="QEnterEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Enter"/>
+ <object-type name="QExposeEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Expose"/>
+ <object-type name="QFileOpenEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::FileOpen"/>
+ <object-type name="QFocusEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::FocusIn || %B-&gt;type() == QEvent::FocusOut">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QHelpEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ToolTip || %1-&gt;type() == QEvent::WhatsThis"/>
- <object-type name="QHideEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Hide"/>
- <object-type name="QHoverEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::HoverEnter || %1-&gt;type() == QEvent::HoverLeave || %1-&gt;type() == QEvent::HoverMove"/>
- <object-type name="QIconDragEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::IconDrag"/>
+ <object-type name="QHelpEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ToolTip || %B-&gt;type() == QEvent::WhatsThis"/>
+ <object-type name="QHideEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Hide"/>
+ <object-type name="QHoverEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::HoverEnter || %B-&gt;type() == QEvent::HoverLeave || %B-&gt;type() == QEvent::HoverMove"/>
+ <object-type name="QIconDragEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::IconDrag"/>
- <object-type name="QInputMethodEvent" copyable="no" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethod">
+ <object-type name="QInputMethodEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::InputMethod">
<!-- only declare this if ndef QT_NO_INPUTMETHOD -->
<enum-type name="AttributeType"/>
<value-type name="Attribute">
@@ -1426,60 +1391,68 @@
</add-function>
<!-- endif ndef QT_NO_INPUTMETHOD -->
</object-type>
- <object-type name="QInputMethodQueryEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethodQuery"/>
+ <object-type name="QInputMethodQueryEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::InputMethodQuery"/>
- <object-type name="QMoveEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Move">
+ <object-type name="QMoveEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Move">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QNativeGestureEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::NativeGesture"/>
- <object-type name="QPlatformSurfaceEvent" copyable="false"
- polymorphic-id-expression="%1-&gt;type() == QEvent::PlatformSurface">
+ <object-type name="QNativeGestureEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::NativeGesture"/>
+ <object-type name="QPlatformSurfaceEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::PlatformSurface">
<enum-type name="SurfaceEventType"/>
</object-type>
- <object-type name="QResizeEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Resize">
+ <object-type name="QResizeEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Resize">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QShortcutEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Shortcut">
+ <object-type name="QShortcutEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Shortcut">
</object-type>
- <object-type name="QShowEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Show"/>
- <object-type name="QSinglePointEvent" copyable="false" since="6.0"/>
- <object-type name="QStatusTipEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::StatusTip"/>
- <object-type name="QTabletEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::TabletMove || %1-&gt;type() == QEvent::TabletPress || %1-&gt;type() == QEvent::TabletRelease">
+ <object-type name="QShowEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Show"/>
+ <object-type name="QSinglePointEvent"/>
+ <object-type name="QStatusTipEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::StatusTip"/>
+ <object-type name="QTabletEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::TabletMove || %B-&gt;type() == QEvent::TabletPress || %B-&gt;type() == QEvent::TabletRelease">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QToolBarChangeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ToolBarChange"/>
- <object-type name="QWhatsThisClickedEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::WhatsThisClicked"/>
- <object-type name="QWheelEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Wheel">
+ <object-type name="QToolBarChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ToolBarChange"/>
+ <object-type name="QWhatsThisClickedEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::WhatsThisClicked"/>
+ <object-type name="QWheelEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Wheel">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <!-- Qt5.5: suppress this nameless enum -->
- <suppress-warning text="enum 'QWheelEvent::DefaultDeltasPerStep' does not have a type entry or is not an enum"/>
- <object-type name="QWindowStateChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::WindowStateChange">
+ <object-type name="QWindowStateChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::WindowStateChange">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QInputEvent" copyable="false"/>
- <object-type name="QKeyEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::KeyPress || %1-&gt;type() == QEvent::KeyRelease || %1-&gt;type() == QEvent::ShortcutOverride">
+ <object-type name="QInputEvent"/>
+ <object-type name="QKeyEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::KeyPress || %B-&gt;type() == QEvent::KeyRelease || %B-&gt;type() == QEvent::ShortcutOverride">
<add-function signature="operator!=(QKeySequence::StandardKey)">
<inject-code class="target" file="../glue/qtgui.cpp" snippet="qkeyevent-operatornotequal"/>
</add-function>
@@ -1489,8 +1462,8 @@
</inject-code>
</add-function>
</object-type>
- <object-type name="QMouseEvent" copyable= "false"
- polymorphic-id-expression="%1-&gt;type() == QEvent::MouseButtonDblClick || %1-&gt;type() == QEvent::MouseButtonPress || %1-&gt;type() == QEvent::MouseButtonRelease || %1-&gt;type() == QEvent::MouseMove">
+ <object-type name="QMouseEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::MouseButtonDblClick || %B-&gt;type() == QEvent::MouseButtonPress || %B-&gt;type() == QEvent::MouseButtonRelease || %B-&gt;type() == QEvent::MouseMove">
<modify-function signature="globalPos() const" deprecated="yes"/>
<modify-function signature="localPos() const" deprecated="yes"/>
<modify-function signature="pos() const" deprecated="yes"/>
@@ -1506,18 +1479,19 @@
</inject-code>
</add-function>
</object-type>
- <object-type name="QPaintEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Paint"/>
- <object-type name="QScrollEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Scroll">
+ <object-type name="QPaintEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Paint"/>
+ <object-type name="QScrollEvent" polymorphic-id-expression="%B-&gt;type() == QEvent::Scroll">
<enum-type name="ScrollState"/>
</object-type>
- <object-type name="QPointerEvent" copyable= "false" since="6.0">
+ <object-type name="QPointerEvent" copyable= "false">
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_qdebug_gui"/>
</inject-code>
</add-function>
</object-type>
- <object-type name="QScrollPrepareEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ScrollPrepare"/>
+ <object-type name="QScrollPrepareEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ScrollPrepare"/>
<object-type name="QTextFrame" >
<extra-includes>
@@ -1551,7 +1525,7 @@
<include file-name="QRect" location="global"/>
</extra-includes>
<enum-type name="ImageOption"/>
- <enum-type name="Transformation" flags="Transformations" since="5.5"/>
+ <enum-type name="Transformation" flags="Transformations"/>
<modify-function signature="setDevice(QIODevice*)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -1631,7 +1605,7 @@
</add-function>
</object-type>
- <object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%1)">
+ <object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%B)">
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
@@ -1775,6 +1749,18 @@
<include file-name="QPixmap" location="global"/>
</extra-includes>
<enum-type name="Mode"/>
+ <modify-function signature="setPixmap(const QPixmap&amp;, QClipboard::Mode)">
+ <modify-argument index="1" pyi-type="PySide6.QtGui.QPixmap"/>
+ </modify-function>
+ <add-function signature="setPixmap(PyPathLike@path@)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qclipboard-setpixmap"/>
+ </add-function>
+ <modify-function signature="setImage(const QImage&amp;, QClipboard::Mode)">
+ <modify-argument index="1" pyi-type="PySide6.QtGui.QImage"/>
+ </modify-function>
+ <add-function signature="setImage(PyPathLike@path@)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qclipboard-setimage"/>
+ </add-function>
<modify-function signature="setMimeData(QMimeData*,QClipboard::Mode)" allow-thread="yes">
<modify-argument index="1">
<!-- TODO: maybe this is not the best solution -->
@@ -1782,7 +1768,7 @@
</modify-argument>
</modify-function>
<modify-function signature="text(QString&amp;,QClipboard::Mode)const">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[str, PySide6.QtGui.QClipboard.Mode]">
<replace-type modified-type="(retval, subtype)"/>
</modify-argument>
<inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/>
@@ -1803,6 +1789,7 @@
<include file-name="QTextOption" location="global"/>
</extra-includes>
<enum-type name="CursorMode"/>
+ <enum-type name="GlyphRunRetrievalFlag" flags="GlyphRunRetrievalFlags" since="6.5"/>
<value-type name="FormatRange">
<include file-name="QTextLayout" location="global"/>
</value-type>
@@ -1814,9 +1801,9 @@
<include file-name="QTextCursor" location="global"/>
</extra-includes>
<enum-type name="FindFlag" flags="FindFlags"/>
- <enum-type name="MarkdownFeature" flags="MarkdownFeatures" since="5.14"/>
+ <enum-type name="MarkdownFeature" flags="MarkdownFeatures"/>
<enum-type name="MetaInformation"/>
- <enum-type name="ResourceType"/>
+ <enum-type name="ResourceType" python-type="IntEnum"/>
<enum-type name="Stacks" since="4.7"/>
<modify-function signature="setDocumentLayout(QAbstractTextDocumentLayout*)">
<modify-argument index="1">
@@ -1899,11 +1886,9 @@
</add-function>
<!-- ### Overloads using QList<T> does the job of these methods -->
<modify-function signature="drawLines(const QLine*,int)" remove="all"/>
- <modify-function signature="drawLines(const QLineF*,int)" remove="all"/>
<modify-function signature="drawLines(const QPoint*,int)" remove="all"/>
<modify-function signature="drawLines(const QPointF*,int)" remove="all"/>
<modify-function signature="drawRects(const QRect*,int)" remove="all"/>
- <modify-function signature="drawRects(const QRectF*,int)" remove="all"/>
<!-- ### -->
<!-- PYSIDE-1540: Preferably use the QPolygon overloads first to avoid
a costly sequence type check on QPolygon. -->
@@ -1913,7 +1898,6 @@
<insert-template name="qpainter_drawlist"/>
</inject-code>
</add-function>
- <modify-function signature="drawPoints(const QPointF*,int)" remove="all"/>
<add-function signature="drawPoints(QList&lt;QPointF>)" overload-number="3">
<inject-code>
<insert-template name="qpainter_drawlist"/>
@@ -1982,6 +1966,9 @@
<inject-code class="target" position="beginning">
<insert-template name="fix_args,QRectF*"/>
</inject-code>
+ <inject-documentation format="target" mode="prepend">
+ The function returns the bounding rectangle enclosing the whole text.
+ </inject-documentation>
</modify-function>
<modify-function signature="drawText(QRect,int,QString,QRect*)">
<modify-argument index="4">
@@ -1994,6 +1981,9 @@
<inject-code class="target" position="beginning">
<insert-template name="fix_args,QRect*"/>
</inject-code>
+ <inject-documentation format="target" mode="prepend">
+ The function returns the bounding rectangle enclosing the whole text.
+ </inject-documentation>
</modify-function>
<modify-function signature="drawText(int,int,int,int,int,QString,QRect*)">
<modify-argument index="7">
@@ -2003,6 +1993,9 @@
<inject-code class="target" position="beginning">
<insert-template name="fix_args,QRect*"/>
</inject-code>
+ <inject-documentation format="target" mode="prepend">
+ The function returns the bounding rectangle enclosing the whole text.
+ </inject-documentation>
</modify-function>
<add-function signature="__enter__()" return-type="QPainter">
<inject-code file="../glue/qtgui.cpp" snippet="qpainter-enter"/>
@@ -2310,7 +2303,7 @@
</value-type>
<value-type name="QMatrix4x4" since="4.6">
- <enum-type name="Flag" flags="Flags" since="6.0"/>
+ <enum-type name="Flag" flags="Flags"/>
<!-- Qt5: HAIRY TRICK ALERT ahead!
Qt5 partially replaced 'qreal' by float.
@@ -2373,7 +2366,7 @@
<remove-argument/>
</modify-argument>
<modify-argument index="return">
- <replace-type modified-type="PyTupleObject*"/>
+ <replace-type modified-type="Tuple"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4-copydatato"/>
</modify-function>
@@ -2382,7 +2375,7 @@
<modify-argument index="1">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QMatrix4x4, bool]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -2422,10 +2415,27 @@
</inject-code>
</add-function>
- <!-- Qt5.5: XXX support the output variables! For now, I just suppressed the new methods. -->
- <modify-function signature="getAxisAndAngle(float*,float*,float*,float*)const" since="5.5" remove="all"/>
- <modify-function signature="getAxisAndAngle(QVector3D*,float*)const" since="5.5" remove="all"/>
- <modify-function signature="getEulerAngles(float*,float*,float*)const" since="5.5" remove="all"/>
+ <!-- There can be only one return type. -->
+ <modify-function signature="getAxisAndAngle(float*,float*,float*,float*)const" remove="all"/>
+ <modify-function signature="getAxisAndAngle(QVector3D*,float*)const">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QVector3D, float]">
+ <replace-type modified-type="(QVector3D, float)"/>
+ </modify-argument>
+ <modify-argument index="1"><remove-argument/></modify-argument>
+ <modify-argument index="2"><remove-argument/></modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qquaternion-getaxisandangle-vector3d-float"/>
+ </modify-function>
+ <modify-function signature="getEulerAngles(float*,float*,float*)const">
+ <modify-argument index="return" pyi-type="Tuple[float, float, float]">
+ <replace-type modified-type="(float, float, float)"/>
+ </modify-argument>
+ <modify-argument index="1"><remove-argument/></modify-argument>
+ <modify-argument index="2"><remove-argument/></modify-argument>
+ <modify-argument index="3"><remove-argument/></modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qquaternion-geteulerangles"/>
+ </modify-function>
</value-type>
<object-type name="QTouchEvent" since="4.6">
@@ -2534,18 +2544,6 @@
</add-function>
</value-type>
- <suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
- <suppress-warning text="template baseclass 'QGenericMatrix&lt;float&gt;' of '*' is not known"/>
-
- <!-- Qt5: note: the unnamed enum cannot be rejected by
- <rejection class="QMatrix4x4" enum-name="enum_1"/>
- Instead, we have to suppress the warning. Why that?
-
- Compare also the note at the beginning of typesystem_widgets_common.xml .
- This seems to be a related problem with unnamed structures in shiboken.
- -->
- <suppress-warning text="enum 'QMatrix4x4::enum_1' is specified in typesystem, but not declared"/>
-
<object-type name="QSessionManager">
<extra-includes>
</extra-includes>
@@ -2553,9 +2551,6 @@
<!-- ### -->
</object-type>
- <!-- This enum is present on QtCore -->
- <suppress-warning text="enum 'QCoreApplication::ApplicationFlags' is specified in typesystem, but not declared"/>
-
<!-- Qt5: here the new QWindow stuff and what it pulls in -->
<object-type name="QBackingStore"/>
<object-type name="QSurface">
@@ -2564,13 +2559,13 @@
</object-type>
<rejection class="QSurface" field-name="m_reserved"/>
<value-type name="QSurfaceFormat">
- <enum-type name="ColorSpace" since="5.10"/>
+ <enum-type name="ColorSpace"/>
<enum-type name="FormatOption" flags="FormatOptions"/>
<enum-type name="OpenGLContextProfile"/>
<enum-type name="RenderableType"/>
<enum-type name="SwapBehavior"/>
</value-type>
- <object-type name="QOffscreenSurface" since="5.1"/>
+ <object-type name="QOffscreenSurface"/>
<primitive-type name="QPlatformSurface">
<extra-includes>
<include file-name="QtGui/qpa/qplatformsurface.h" location="global"/>
@@ -2622,6 +2617,8 @@
<include file-name="QLocale" location="global"/>
<include file-name="pysideqapp.h" location="global"/>
<include file-name="pysidecleanup.h" location="global"/>
+ <!-- QOverrideCursorGuard -->
+ <include file-name="qtguihelper.h" location="local"/>
</extra-includes>
<modify-function signature="QGuiApplication(int&amp;,char**,int)" access="private"/>
<add-function signature="QGuiApplication(QStringList)">
@@ -2635,8 +2632,15 @@
<add-function signature="exec_()" return-type="int">
<inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-exec"/>
</add-function>
+ <add-function signature="nativeInterface()const" return-type="PyObject">
+ <modify-argument index="return"> <!-- Suppress return value heuristics -->
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qguiapplication-nativeInterface"/>
+ </add-function>
<modify-function signature="setOverrideCursor(const QCursor&amp;)">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="PyObject">
<replace-type modified-type="QtGuiHelper::QOverrideCursorGuard*"/>
</modify-argument>
<inject-code class="target" position="end" file="../glue/qtgui.cpp"
@@ -2644,14 +2648,46 @@
</modify-function>
</object-type>
+ <namespace-type name="QNativeInterface" private="yes" since="6.7">
+ <object-type name="QX11Application" private="yes" disable-wrapper="yes"
+ force-abstract="yes">
+ <configuration condition="QT_CONFIG(xcb)"/>
+ <modify-function signature="display()const">
+ <modify-argument index="return">
+ <replace-type modified-type="int"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtgui.cpp"
+ snippet="qx11application-resource-ptr"/>
+ </modify-function>
+ <modify-function signature="connection()const">
+ <modify-argument index="return">
+ <replace-type modified-type="int"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtgui.cpp"
+ snippet="qx11application-resource-ptr"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QWindowsScreen" private="yes" disable-wrapper="yes"
+ force-abstract="yes">
+ <configuration condition="#ifdef Q_OS_WIN"/>
+ </object-type>
+ </namespace-type>
+
<object-type name="QOpenGLContext">
<enum-type name="OpenGLModuleType"/>
</object-type>
- <object-type name="QOpenGLContextGroup" since="5.0"/>
+ <object-type name="QOpenGLContextGroup"/>
<!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function
- <object-type name="QOpenGLPaintDevice" since="5.0"/>
+ <object-type name="QOpenGLPaintDevice"/>
-->
- <object-type name="QOpenGLExtraFunctions" since="5.6">
+ <object-type name="QOpenGLExtraFunctions">
+ <extra-includes>
+ <include file-name="QtCore/QVarLengthArray" location="global"/>
+ <include file-name="sbkcpptonumpy.h" location="global"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglextrafunctions-glgeti-v-return-size"/>
+
<!-- Exlusions due to compile errors -->
<modify-function signature="glEndTransformFeedback()" remove="all"/>
<modify-function signature="glPauseTransformFeedback()" remove="all"/>
@@ -2659,184 +2695,201 @@
<modify-function signature="^glClearBuffer.*\(.*\*.*$">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDebugMessageControl(&GLuint;,&GLuint;,&GLuint;,&GLint;,const &GLuint;*,&GLbyte;)">
+ <modify-function signature="glDebugMessageControl(GLenum,GLenum,GLenum,GLsizei,const GLuint*,GLboolean)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteProgramPipelines(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDeleteProgramPipelines(GLsizei,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteQueries(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDeleteQueries(GLsizei,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteSamplers(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDeleteSamplers(GLsizei,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteTransformFeedbacks(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDeleteTransformFeedbacks(GLsizei,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDeleteVertexArrays(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDeleteVertexArrays(GLsizei,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glDrawBuffers(&GLint;,const &GLuint;*)">
+ <modify-function signature="glDrawBuffers(GLsizei,const GLenum*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGenProgramPipelines(&GLint;,&GLuint;*)">
+ <modify-function signature="glGenProgramPipelines(GLsizei,GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGenQueries(&GLint;,&GLuint;*)">
+ <modify-function signature="glGenQueries(GLsizei,GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGenSamplers(&GLint;,&GLuint;*)">
+ <modify-function signature="glGenSamplers(GLsizei,GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGenTransformFeedbacks(&GLint;,&GLuint;*)">
+ <modify-function signature="glGenTransformFeedbacks(GLsizei,GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGenVertexArrays(&GLint;,&GLuint;*)">
+ <modify-function signature="glGenVertexArrays(GLsizei,GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetActiveUniformBlockiv(&GLuint;,&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetActiveUniformBlockiv(GLuint,GLuint,GLenum,GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetActiveUniformsiv(&GLuint;,&GLint;,const &GLuint;*,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetActiveUniformsiv(GLuint,GLsizei,const GLuint*,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetFramebufferParameteriv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetFramebufferParameteriv(GLenum,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetIntegeri_v(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetBooleani_v(GLenum,GLuint,GLboolean*)">
+ <modify-argument index="return" pyi-type="Union[bool,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglextrafunctions-glgetbooleani-v"/>
+ </modify-function>
+ <!-- FIXME PYSIDE 7: Use the remove array modification and use
+ the version with return value instead -->
+ <modify-function signature="glGetIntegeri_v(GLenum,GLuint,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetInternalformativ(&GLuint;,&GLuint;,&GLuint;,&GLint;,&GLint;*)">
+ <add-function signature="glGetIntegeri_v(GLuint,GLuint)" return-type="PyObject">
+ <modify-argument index="return" pyi-type="Union[int,numpy.ndarray]"/>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglextrafunctions-glgetintegeri-v"/>
+ </add-function>
+ <modify-function signature="glGetInternalformativ(GLenum,GLenum,GLenum,GLsizei,GLint*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetMultisamplefv(&GLuint;,&GLuint;,float*)">
+ <modify-function signature="glGetMultisamplefv(GLenum,GLuint,GLfloat*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetProgramInterfaceiv(&GLuint;,&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetProgramInterfaceiv(GLuint,GLenum,GLenum,GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetProgramPipelineiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetProgramPipelineiv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetProgramResourceiv(&GLuint;,&GLuint;,&GLuint;,&GLint;,const &GLuint;*,&GLint;,&GLint;*,&GLint;*)">
+ <modify-function signature="glGetProgramResourceiv(GLuint,GLenum,GLuint,GLsizei,const GLenum*,GLsizei,GLsizei*,GLint*)">
<modify-argument index="5"><array/></modify-argument>
<modify-argument index="7"><array/></modify-argument>
<modify-argument index="8"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetQueryObjectuiv(&GLuint;,&GLuint;,&GLuint;*)">
+ <modify-function signature="glGetQueryObjectuiv(GLuint,GLenum,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetQueryiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetQueryiv(GLenum,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetSamplerParameterfv(&GLuint;,&GLuint;,float*)">
+ <modify-function signature="glGetSamplerParameterfv(GLuint,GLenum,GLfloat*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetSamplerParameteriv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetSamplerParameteriv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetSamplerParameterIiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetSamplerParameterIiv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetSamplerParameterIuiv(&GLuint;,&GLuint;,&GLuint;*)">
+ <modify-function signature="glGetSamplerParameterIuiv(GLuint,GLenum,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetTexLevelParameteriv(&GLuint;,&GLint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetTexLevelParameteriv(GLenum,GLint,GLenum,GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetTexLevelParameterfv(&GLuint;,&GLint;,&GLuint;,float*)">
+ <modify-function signature="glGetTexLevelParameterfv(GLenum,GLint,GLenum,GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetTexParameterIiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetTexParameterIiv(GLenum,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetTexParameterIuiv(&GLuint;,&GLuint;,&GLuint;*)">
+ <modify-function signature="glGetTexParameterIuiv(GLenum,GLenum,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetnUniformiv(&GLuint;,&GLint;,&GLint;,&GLint;*)">
+ <modify-function signature="glGetnUniformiv(GLuint,GLint,GLsizei,GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetnUniformuiv(&GLuint;,&GLint;,&GLint;,&GLuint;*)">
+ <modify-function signature="glGetnUniformuiv(GLuint,GLint,GLsizei,GLuint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetUniformuiv(&GLuint;,&GLint;,&GLuint;*)">
+ <modify-function signature="glGetUniformuiv(GLuint,GLint,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetVertexAttribIiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetVertexAttribIiv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetVertexAttribIuiv(&GLuint;,&GLuint;,&GLuint;*)">
+ <modify-function signature="glGetVertexAttribIuiv(GLuint,GLenum,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glInvalidateFramebuffer(&GLuint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glInvalidateFramebuffer(GLenum,GLsizei,const GLenum*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glInvalidateSubFramebuffer(&GLuint;,&GLint;,const &GLuint;*,&GLint;,&GLint;,&GLint;,&GLint;)">
+ <modify-function signature="glInvalidateSubFramebuffer(GLenum,GLsizei,const GLenum*,GLint,GLint,GLsizei,GLsizei)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform1fv(&GLuint;,&GLint;,&GLint;,const float*)">
+ <modify-function signature="glProgramUniform1fv(GLuint,GLint,GLsizei,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform1iv(&GLuint;,&GLint;,&GLint;,const &GLint;*)">
+ <modify-function signature="glProgramUniform1iv(GLuint,GLint,GLsizei,const GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform1uiv(&GLuint;,&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glProgramUniform1uiv(GLuint,GLint,GLsizei,const GLuint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform2fv(&GLuint;,&GLint;,&GLint;,const float*)">
+ <modify-function signature="glProgramUniform2fv(GLuint,GLint,GLsizei,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform2iv(&GLuint;,&GLint;,&GLint;,const &GLint;*)">
+ <modify-function signature="glProgramUniform2iv(GLuint,GLint,GLsizei,const GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform2uiv(&GLuint;,&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glProgramUniform2uiv(GLuint,GLint,GLsizei,const GLuint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform3fv(&GLuint;,&GLint;,&GLint;,const float*)">
+ <modify-function signature="glProgramUniform3fv(GLuint,GLint,GLsizei,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform3iv(&GLuint;,&GLint;,&GLint;,const &GLint;*)">
+ <modify-function signature="glProgramUniform3iv(GLuint,GLint,GLsizei,const GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform3uiv(&GLuint;,&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glProgramUniform3uiv(GLuint,GLint,GLsizei,const GLuint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform4fv(&GLuint;,&GLint;,&GLint;,const float*)">
+ <modify-function signature="glProgramUniform4fv(GLuint,GLint,GLsizei,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform4iv(&GLuint;,&GLint;,&GLint;,const &GLint;*)">
+ <modify-function signature="glProgramUniform4iv(GLuint,GLint,GLsizei,const GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniform4uiv(&GLuint;,&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glProgramUniform4uiv(GLuint,GLint,GLsizei,const GLuint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix2fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix2fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix2x3fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix2x3fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix2x4fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix2x4fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix3fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix3fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix3x2fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix3x2fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix3x4fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix3x4fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix4fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix4fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix4x2fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix4x2fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
- <modify-function signature="glProgramUniformMatrix4x3fv(&GLuint;,&GLint;,&GLint;,&GLbyte;,const float*)">
+ <modify-function signature="glProgramUniformMatrix4x3fv(GLuint,GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="5"><array/></modify-argument>
</modify-function>
<modify-function signature="^glSamplerParameterI?u?[fi]v\(.*$">
@@ -2845,43 +2898,43 @@
<modify-function signature="^glTexParameterI?u?[fi]v\(.*$">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniform1uiv(&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glUniform1uiv(GLint,GLsizei,const GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniform2uiv(&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glUniform2uiv(GLint,GLsizei,const GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniform3uiv(&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glUniform3uiv(GLint,GLsizei,const GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniform4uiv(&GLint;,&GLint;,const &GLuint;*)">
+ <modify-function signature="glUniform4uiv(GLint,GLsizei,const GLuint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix2x3fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix2x3fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix2x4fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix2x4fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix3x2fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix3x2fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix3x4fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix3x4fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix4x2fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix4x2fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glUniformMatrix4x3fv(&GLint;,&GLsizei;,&GLboolean;,const float*)">
+ <modify-function signature="glUniformMatrix4x3fv(GLint,GLsizei,GLboolean,const GLfloat*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glVertexAttribI4iv(&GLuint;,const &GLint;*)">
+ <modify-function signature="glVertexAttribI4iv(GLuint,const GLint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glVertexAttribI4uiv(&GLuint;,const &GLuint;*)">
+ <modify-function signature="glVertexAttribI4uiv(GLuint,const GLuint*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetStringi(&GLuint;,&GLuint;)">
+ <modify-function signature="glGetStringi(GLenum,GLuint)">
<modify-argument index="return">
<replace-type modified-type="QString"/>
</modify-argument>
@@ -2889,42 +2942,73 @@
snippet="glgetstring-return"/>
</modify-function>
</object-type>
- <object-type name="QOpenGLFunctions" since="5.0">
+ <object-type name="QOpenGLFunctions">
+ <extra-includes>
+ <include file-name="QtCore/QVarLengthArray" location="global"/>
+ <include file-name="sbkcpptonumpy.h" location="global"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglfunctions-glgetv-return-size"/>
+
<enum-type name="OpenGLFeature" flags="OpenGLFeatures"/>
- <add-function signature="glGetShaderSource(&GLuint; @shader@)" return-type="const char *">
+ <add-function signature="glGetShaderSource(GLuint @shader@)" return-type="const char *">
<inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
snippet="glgetshadersource"/>
</add-function>
- <add-function signature="glShaderSource(&GLuint; @shader@,const QString &amp; @source@)">
+ <add-function signature="glShaderSource(GLuint @shader@,const QString &amp; @source@)">
<inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
snippet="glshadersource"/>
</add-function>
- <modify-function signature="glGetAttachedShaders(&GLuint;,&GLint;,&GLint;*,&GLuint;*)">
+ <modify-function signature="glGetAttachedShaders(GLuint,GLsizei,GLsizei*,GLuint*)">
<modify-argument index="3"><array/></modify-argument>
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetBufferParameteriv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetBufferParameteriv(GLenum,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetFloatv(&GLuint;,float*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetFramebufferAttachmentParameteriv(&GLuint;,&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetFramebufferAttachmentParameteriv(GLenum,GLenum,GLenum,GLint*)">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetIntegerv(&GLuint;,&GLint;*)">
+ <modify-function signature="glGetBooleanv(GLenum,GLboolean*)">
+ <modify-argument index="return" pyi-type="Union[bool,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglfunctions-glgetbooleanv"/>
+ </modify-function>
+ <!-- FIXME PYSIDE 7: Use the remove array modification and use
+ the version with return value instead -->
+ <modify-function signature="glGetFloatv(GLenum,GLfloat*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetProgramiv(&GLuint;,&GLuint;,&GLint;*)">
+ <add-function signature="glGetFloatv(GLuint)" return-type="PyObject">
+ <modify-argument index="return" pyi-type="Union[float,numpy.ndarray]"/>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglfunctions-glgetfloatv"/>
+ </add-function>
+ <!-- FIXME PYSIDE 7: Use the remove array modification and use
+ the version with return value instead -->
+ <modify-function signature="glGetIntegerv(GLenum,GLint*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <add-function signature="glGetIntegerv(GLuint)" return-type="PyObject">
+ <modify-argument index="return" pyi-type="Union[int,numpy.ndarray]"/>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qopenglfunctions-glgetintegerv"/>
+ </add-function>
+ <modify-function signature="glGetProgramiv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetRenderbufferParameteriv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetRenderbufferParameteriv(GLenum,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetShaderiv(&GLuint;,&GLuint;,&GLint;*)">
+ <modify-function signature="glGetShaderiv(GLuint,GLenum,GLint*)">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetShaderPrecisionFormat(&GLuint;,&GLuint;,&GLint;*,&GLint;*)">
+ <modify-function signature="glGetShaderPrecisionFormat(GLenum,GLenum,GLint*,GLint*)">
<modify-argument index="3"><array/></modify-argument>
<modify-argument index="4"><array/></modify-argument>
</modify-function>
@@ -2949,7 +3033,7 @@
<modify-function signature="^glGetVertexAttrib[fi]v\(.*$">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
- <modify-function signature="glGetString(&GLuint;)">
+ <modify-function signature="glGetString(GLenum)">
<modify-argument index="return">
<replace-type modified-type="QString"/>
</modify-argument>
@@ -2957,38 +3041,38 @@
<insert-template name="glGetString_return_QString"/>
</inject-code>
</modify-function>
- <modify-function signature="glShaderBinary(&GLint;,const &GLuint;*,&GLuint;,const void *,&GLint;)">
+ <modify-function signature="glShaderBinary(GLint,const GLuint*,GLenum,const void*,GLint)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
</object-type>
<!-- Classes are result of a macro expansion in src/gui/opengl/qopenglversionfunctions.h
- <object-type name="QOpenGLFunctions_1_0" since="5.1"/>
- <object-type name="QOpenGLFunctions_1_1" since="5.1"/>
- <object-type name="QOpenGLFunctions_1_2" since="5.1"/>
- <object-type name="QOpenGLFunctions_1_3" since="5.1"/>
- <object-type name="QOpenGLFunctions_1_4" since="5.1"/>
- <object-type name="QOpenGLFunctions_1_5" since="5.1"/>
- <object-type name="QOpenGLFunctions_2_0" since="5.1">
- <object-type name="QOpenGLFunctions_2_1" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_0" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_1" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_2_Core" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_3_3_Core" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_0_Core" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_1_Core" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_2_Core" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1"/>
- <object-type name="QOpenGLFunctions_4_3_Core" since="5.1"/>
+ <object-type name="QOpenGLFunctions_1_0"/>
+ <object-type name="QOpenGLFunctions_1_1"/>
+ <object-type name="QOpenGLFunctions_1_2"/>
+ <object-type name="QOpenGLFunctions_1_3"/>
+ <object-type name="QOpenGLFunctions_1_4"/>
+ <object-type name="QOpenGLFunctions_1_5"/>
+ <object-type name="QOpenGLFunctions_2_0">
+ <object-type name="QOpenGLFunctions_2_1"/>
+ <object-type name="QOpenGLFunctions_3_0"/>
+ <object-type name="QOpenGLFunctions_3_1"/>
+ <object-type name="QOpenGLFunctions_3_2_Compatibility"/>
+ <object-type name="QOpenGLFunctions_3_2_Core"/>
+ <object-type name="QOpenGLFunctions_3_3_Compatibility"/>
+ <object-type name="QOpenGLFunctions_3_3_Core"/>
+ <object-type name="QOpenGLFunctions_4_0_Compatibility"/>
+ <object-type name="QOpenGLFunctions_4_0_Core"/>
+ <object-type name="QOpenGLFunctions_4_1_Compatibility"/>
+ <object-type name="QOpenGLFunctions_4_1_Core"/>
+ <object-type name="QOpenGLFunctions_4_2_Compatibility"/>
+ <object-type name="QOpenGLFunctions_4_2_Core"/>
+ <object-type name="QOpenGLFunctions_4_3_Compatibility"/>
+ <object-type name="QOpenGLFunctions_4_3_Core"/>
<object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5/>
- <object-type name="QOpenGLFunctions_4_4_Core" since="5.5"/>
- <object-type name="QOpenGLFunctions_4_5_Compatibility since="5.5""/>
- <object-type name="QOpenGLFunctions_4_5_Core" since="5.5"/>
- <object-type name="QOpenGLFunctions_ES2" since="5.1"/>
+ <object-type name="QOpenGLFunctions_4_4_Core"/>
+ <object-type name="QOpenGLFunctions_4_5_Compatibility/>
+ <object-type name="QOpenGLFunctions_4_5_Core"/>
+ <object-type name="QOpenGLFunctions_ES2"/>
-->
<value-type name="QPageLayout">
<enum-type name="Mode"/>
@@ -3014,7 +3098,7 @@
<enum-type name="YUVLayout"/>
</value-type>
<object-type name="QPdfWriter"/>
- <object-type name="QPointingDevice" since="6.0">
+ <object-type name="QPointingDevice">
<enum-type name="PointerType" flags="PointerTypes"/>
<enum-type name="GrabTransition"/>
</object-type>
@@ -3036,6 +3120,13 @@
</modify-argument>
<inject-code file="../glue/qtgui.cpp" snippet="qscreen-grabWindow"/>
</modify-function>
+ <add-function signature="nativeInterface()const" return-type="PyObject">
+ <modify-argument index="return"> <!-- Suppress return value heuristics -->
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp"
+ snippet="qscreen-nativeInterface"/>
+ </add-function>
</object-type>
<object-type name="QStyleHints"/>
@@ -3076,7 +3167,7 @@
<namespace-type name="QtGuiHelper" visible="no">
<object-type name="QOverrideCursorGuard" copyable="no">
- <add-function signature="__enter__()" return-type="QOverrideCursorGuard">
+ <add-function signature="__enter__()" return-type="QtGuiHelper::QOverrideCursorGuard">
<inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
</add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
@@ -3085,4 +3176,6 @@
</object-type>
</namespace-type>
+ <opaque-container name="QList" opaque-containers="QVector2D:QVector2DList;QVector3D:QVector3DList;QVector4D:QVector4DList"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_rhi.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_rhi.xml
new file mode 100644
index 000000000..22ab56e20
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_rhi.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtGui">
+ <value-type name="QRhiDepthStencilClearValue" since="6.6" private="yes"/>
+ <value-type name="QRhiViewport" since="6.6" private="yes"/>
+ <value-type name="QRhiScissor" since="6.6" private="yes"/>
+ <value-type name="QRhiVertexInputBinding" since="6.6" private="yes">
+ <enum-type name="Classification"/>
+ </value-type>
+ <value-type name="QRhiVertexInputAttribute" since="6.6" private="yes">
+ <enum-type name="Format"/>
+ </value-type>
+ <value-type name="QRhiVertexInputLayout" since="6.6" private="yes">
+ <add-function signature="setBindings(QList&lt;QRhiVertexInputBinding&gt;@bindings@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qrhi-initializer-list"/>
+ </add-function>
+ <add-function signature="setAttributes(QList&lt;QRhiVertexInputAttribute&gt;@attributes@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qrhi-initializer-list"/>
+ </add-function>
+ </value-type>
+ <value-type name="QRhiShaderStage" since="6.6" private="yes">
+ <enum-type name="Type"/>
+ </value-type>
+ <value-type name="QRhiShaderResourceBinding" since="6.6" private="yes">
+ <enum-type name="Type"/>
+ <enum-type name="StageFlag" flags="StageFlags"/>
+ <value-type name="TextureAndSampler" private="yes"/>
+ <value-type name="Data" private="yes">
+ <value-type name="StorageImageData" private="yes"/>
+ <value-type name="StorageBufferData" private="yes"/>
+ </value-type>
+ </value-type>
+ <value-type name="QRhiColorAttachment" since="6.6" private="yes"/>
+ <value-type name="QRhiTextureRenderTargetDescription" since="6.6" private="yes">
+ <add-function signature="setColorAttachments(QList&lt;QRhiColorAttachment&gt;@bcolor_attachments@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qrhi-initializer-list"/>
+ </add-function>
+ </value-type>
+ <value-type name="QRhiTextureSubresourceUploadDescription" since="6.6" private="yes"/>
+ <value-type name="QRhiTextureUploadEntry" since="6.6" private="yes"/>
+ <value-type name="QRhiTextureUploadDescription" since="6.6" private="yes">
+ <add-function signature="setEntries(QList&lt;QRhiTextureUploadEntry&gt;@entries@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qrhi-initializer-list"/>
+ </add-function>
+ </value-type>
+ <value-type name="QRhiTextureCopyDescription" since="6.6" private="yes"/>
+ <value-type name="QRhiReadbackDescription" since="6.6" private="yes"/>
+ <value-type name="QRhiNativeHandles" since="6.6" private="yes"/>
+ <object-type name="QRhiResource" since="6.6" private="yes">
+ <enum-type name="Type"/>
+ </object-type>
+ <object-type name="QRhiBuffer" since="6.6" private="yes">
+ <enum-type name="Type"/>
+ <enum-type name="UsageFlag" flags="UsageFlags"/>
+ <!-- const char * mixup -->
+ <modify-function signature="beginFullDynamicBufferUpdateForCurrentFrame()" remove="all"/>
+ </object-type>
+ <object-type name="QRhiTexture" since="6.6" private="yes">
+ <enum-type name="Format"/>
+ <enum-type name="Flag" flags="Flags"/>
+ </object-type>
+ <object-type name="QRhiSampler" since="6.6" private="yes">
+ <enum-type name="Filter"/>
+ <enum-type name="AddressMode"/>
+ <enum-type name="CompareOp"/>
+ </object-type>
+ <object-type name="QRhiRenderBuffer" since="6.6" private="yes">
+ <enum-type name="Type"/>
+ <enum-type name="Flag" flags="Flags"/>
+ </object-type>
+ <object-type name="QRhiRenderPassDescriptor" since="6.6" private="yes"/>
+ <object-type name="QRhiRenderTarget" since="6.6" private="yes"/>
+ <object-type name="QRhiSwapChainRenderTarget" since="6.6" private="yes"/>
+ <object-type name="QRhiTextureRenderTarget" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ </object-type>
+ <object-type name="QRhiShaderResourceBindings" since="6.6" private="yes">
+ <enum-type name="UpdateFlag" flags="UpdateFlags"/>
+ <modify-field name="BINDING_PREALLOC" remove="true"/>
+ <add-function signature="setBindings(QList&lt;QRhiShaderResourceBinding&gt;@bindings@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp" snippet="qrhi-initializer-list"/>
+ </add-function>
+ </object-type>
+ <object-type name="QRhiGraphicsPipeline" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="BlendOp"/>
+ <enum-type name="Topology"/>
+ <enum-type name="CullMode"/>
+ <enum-type name="FrontFace"/>
+ <enum-type name="ColorMaskComponent" flags="ColorMask"/>
+ <enum-type name="BlendFactor"/>
+ <enum-type name="CompareOp"/>
+ <enum-type name="StencilOp"/>
+ <enum-type name="PolygonMode"/>
+ <value-type name="StencilOpState" private="yes"/>
+ <value-type name="TargetBlend" private="yes"/>
+ <add-function signature="setShaderStages(QList&lt;QRhiShaderStage&gt;@stages@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp"
+ snippet="qrhi-initializer-list"/>
+ </add-function>
+ <add-function signature="setTargetBlends(QList&lt;QRhiGraphicsPipeline::TargetBlend&gt;@blends@)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp"
+ snippet="qrhi-initializer-list"/>
+ </add-function>
+ </object-type>
+ <object-type name="QRhiSwapChain" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="Format"/>
+ <enum-type name="StereoTargetBuffer"/>
+ </object-type>
+ <object-type name="QRhiComputePipeline" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ </object-type>
+ <object-type name="QRhiCommandBuffer" since="6.6" private="yes">
+ <enum-type name="BeginPassFlag" flags="BeginPassFlags"/>
+ <enum-type name="IndexFormat"/>
+ <modify-function signature="^setVertexInput\(.*\)$" remove="all"/>
+ <add-function signature="setVertexInput(int@startBinding@,QList&lt;std::pair&lt;QRhiBuffer*,quint32&gt;&gt;@bindings@,QRhiBuffer*@indexBuf@=nullptr,quint32@indexOffset@=0,QRhiCommandBuffer::IndexFormat @indexFormat@ = QRhiCommandBuffer::IndexUInt16)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtgui.cpp"
+ snippet="qrhi-commandbuffer-setvertexinput"/>
+ </add-function>
+ </object-type>
+ <value-type name="QRhiReadbackResult" since="6.6" private="yes"/>
+ <object-type name="QRhiResourceUpdateBatch" since="6.6" private="yes"/>
+ <value-type name="QRhiDriverInfo" since="6.6" private="yes">
+ <enum-type name="DeviceType"/>
+ </value-type>
+ <value-type name="QRhiStats" since="6.6" private="yes"/>
+ <value-type name="QRhiInitParams" since="6.6" private="yes"/>
+ <value-type name="QRhiNullInitParams" since="6.6" private="yes"/>
+ <value-type name="QRhiGles2InitParams" since="6.6" private="yes"/>
+ <value-type name="QRhiGles2NativeHandles" since="6.6" private="yes"/>
+ <?if windows?>
+ <value-type name="QRhiD3D11InitParams" since="6.6" private="yes"/>
+ <value-type name="QRhiD3D11NativeHandles" since="6.6" private="yes"/>
+ <value-type name="QRhiD3D12InitParams" since="6.6" private="yes"/>
+ <value-type name="QRhiD3D12NativeHandles" since="6.6" private="yes"/>
+ <?endif?>
+ <?if darwin?>
+ <value-type name="QRhiMetalInitParams" since="6.6" private="yes"/>
+ <?endif?>
+
+ <object-type name="QRhi" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="Implementation"/>
+ <enum-type name="FrameOpResult"/>
+ <enum-type name="Feature"/>
+ <enum-type name="BeginFrameFlag" flags="BeginFrameFlags"/>
+ <enum-type name="EndFrameFlag" flags="EndFrameFlags"/>
+ <enum-type name="ResourceLimit"/>
+ </object-type>
+
+ <value-type name="QShader" since="6.6" private="yes">
+ <enum-type name="Stage"/>
+ <enum-type name="Source"/>
+ <enum-type name="Variant"/>
+ <enum-type name="SerializedFormatVersion"/>
+ </value-type>
+ <value-type name="QShaderCode" since="6.6" private="yes"/>
+ <value-type name="QShaderKey" since="6.6" private="yes"/>
+ <value-type name="QShaderVersion" since="6.6" private="yes">
+ <enum-type name="Flag" flags="Flags"/>
+ </value-type>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml
index 89e3a33fe..b3b8a75b6 100644
--- a/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml
@@ -22,6 +22,15 @@
</target-to-native>
</conversion-rule>
</primitive-type>
+ <primitive-type name="HMONITOR" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtgui.cpp" snippet="return-pylong-voidptr"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtgui.cpp"
+ snippet="conversion-pylong"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
<primitive-type name="HRGN" target-lang-api-name="PyLong">
<conversion-rule>
<native-to-target file="../glue/qtgui.cpp" snippet="return-pylong-voidptr"/>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml
index c4f16911e..70331e29c 100644
--- a/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml
@@ -3,4 +3,7 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtGui"/>
+<typesystem package="PySide6.QtGui">
+ <custom-type name="_XDisplay"/>
+ <custom-type name="xcb_connection_t"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtHelp/CMakeLists.txt b/sources/pyside6/PySide6/QtHelp/CMakeLists.txt
index 1b1f1ad74..7bf46dcef 100644
--- a/sources/pyside6/PySide6/QtHelp/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtHelp/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtHelp)
set(QtHelp_SRC
@@ -5,6 +8,7 @@ ${QtHelp_GEN_DIR}/qcompressedhelpinfo_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpcontentitem_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpcontentmodel_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpcontentwidget_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpglobal_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpengine_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpenginecore_wrapper.cpp
${QtHelp_GEN_DIR}/qhelpfilterdata_wrapper.cpp
@@ -37,9 +41,6 @@ set(QtHelp_include_dirs ${QtHelp_SOURCE_DIR}
${QtCore_GEN_DIR}
)
set(QtHelp_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Help_LIBRARIES})
set(QtHelp_deps QtWidgets)
diff --git a/sources/pyside6/PySide6/QtHelp/typesystem_help.xml b/sources/pyside6/PySide6/QtHelp/typesystem_help.xml
index 6af0247cc..5fa30e034 100644
--- a/sources/pyside6/PySide6/QtHelp/typesystem_help.xml
+++ b/sources/pyside6/PySide6/QtHelp/typesystem_help.xml
@@ -4,10 +4,11 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtHelp">
+<typesystem package="PySide6.QtHelp"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
- <value-type name="QCompressedHelpInfo" since="5.13"/>
+ <value-type name="QCompressedHelpInfo"/>
<value-type name="QHelpContentItem">
<modify-function signature="parent()const">
<modify-argument index="return">
@@ -15,16 +16,17 @@
</modify-argument>
</modify-function>
</value-type>
- <object-type name="QHelpContentModel" polymorphic-id-expression="qobject_cast&lt;QHelpContentModel*&gt;(%1)"/>
+ <object-type name="QHelpContentModel" polymorphic-id-expression="qobject_cast&lt;QHelpContentModel*&gt;(%B)"/>
<object-type name="QHelpContentWidget"/>
+ <value-type name="QHelpGlobal"/>
<object-type name="QHelpEngine"/>
<object-type name="QHelpEngineCore"/>
- <value-type name="QHelpFilterData" since="5.13"/>
- <object-type name="QHelpFilterEngine" since="5.13"/>
- <object-type name="QHelpFilterSettingsWidget" since="5.15"/>
+ <value-type name="QHelpFilterData"/>
+ <object-type name="QHelpFilterEngine"/>
+ <object-type name="QHelpFilterSettingsWidget"/>
<object-type name="QHelpIndexModel"/>
<object-type name="QHelpIndexWidget"/>
- <value-type name="QHelpLink" since="5.15"/>
+ <value-type name="QHelpLink"/>
<object-type name="QHelpSearchEngine"/>
<value-type name="QHelpSearchQuery">
<enum-type name="FieldName"/>
diff --git a/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt b/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt
index 6c10ec9a4..c931f064f 100644
--- a/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt
@@ -1,10 +1,12 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtHttpServer)
set(QtHttpServer_SRC
${QtHttpServer_GEN_DIR}/qabstracthttpserver_wrapper.cpp
${QtHttpServer_GEN_DIR}/qfuturehttpserverresponse_wrapper.cpp
${QtHttpServer_GEN_DIR}/qhttpserver_wrapper.cpp
- ${QtHttpServer_GEN_DIR}/qhttpserverfutureresponse_wrapper.cpp
${QtHttpServer_GEN_DIR}/qhttpserverresponder_wrapper.cpp
${QtHttpServer_GEN_DIR}/qhttpserverrequest_wrapper.cpp
${QtHttpServer_GEN_DIR}/qhttpserverresponse_wrapper.cpp
@@ -26,11 +28,7 @@ set(QtHttpServer_include_dirs ${QtHttpServer_SOURCE_DIR}
${QtWebSockets_GEN_DIR})
set(QtHttpServer_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}HttpServer_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Concurrent_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebSockets_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}HttpServer_LIBRARIES})
set(QtHttpServer_deps QtCore QtConcurrent QtNetwork QtWebSockets)
diff --git a/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml b/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml
index adb334462..026a8758a 100644
--- a/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml
+++ b/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml
@@ -3,12 +3,14 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtHttpServer">
+<typesystem package="PySide6.QtHttpServer"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtConcurrent/typesystem_concurrent.xml" generate="no"/>
<load-typesystem name="QtWebSockets/typesystem_websockets.xml" generate="no"/>
<typedef-type name="QFutureHttpServerResponse" source="QFuture&lt;QHttpServerResponse&gt;"/>
- <object-type name="QAbstractHttpServer"/>
+ <!-- virtual void missingHandler(const QHttpServerRequest &, QHttpServerResponder &&) = 0 -->
+ <object-type name="QAbstractHttpServer" disable-wrapper="yes"/>
<object-type name="QHttpServer">
<extra-includes>
<include file-name="QtHttpServer/QHttpServerRequest" location="global"/>
@@ -24,7 +26,6 @@
snippet="qhttpserver-afterrequest"/>
</add-function>
</object-type>
- <object-type name="QHttpServerFutureResponse"/>
<object-type name="QHttpServerResponder">
<enum-type name="StatusCode"/>
</object-type>
diff --git a/sources/pyside6/PySide6/QtLocation/CMakeLists.txt b/sources/pyside6/PySide6/QtLocation/CMakeLists.txt
index 9e58d94ac..db5777e04 100644
--- a/sources/pyside6/PySide6/QtLocation/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtLocation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtLocation)
set(QtLocation_OPTIONAL_SRC )
@@ -10,7 +13,6 @@ ${QtLocation_GEN_DIR}/qgeoroute_wrapper.cpp
${QtLocation_GEN_DIR}/qgeoroutereply_wrapper.cpp
${QtLocation_GEN_DIR}/qgeoroutesegment_wrapper.cpp
${QtLocation_GEN_DIR}/qgeoserviceprovider_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeoserviceproviderfactoryv2_wrapper.cpp
${QtLocation_GEN_DIR}/qplace_wrapper.cpp
${QtLocation_GEN_DIR}/qplacecontentreply_wrapper.cpp
${QtLocation_GEN_DIR}/qplacedetailsreply_wrapper.cpp
@@ -29,8 +31,6 @@ ${QtLocation_GEN_DIR}/qplacecategory_wrapper.cpp
${QtLocation_GEN_DIR}/qplacecontactdetail_wrapper.cpp
${QtLocation_GEN_DIR}/qplacecontent_wrapper.cpp
${QtLocation_GEN_DIR}/qplacecontentrequest_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceeditorial_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceimage_wrapper.cpp
${QtLocation_GEN_DIR}/qplacemanagerengine_wrapper.cpp
${QtLocation_GEN_DIR}/qplacematchreply_wrapper.cpp
${QtLocation_GEN_DIR}/qplacematchrequest_wrapper.cpp
@@ -38,7 +38,6 @@ ${QtLocation_GEN_DIR}/qplaceproposedsearchresult_wrapper.cpp
${QtLocation_GEN_DIR}/qplaceratings_wrapper.cpp
${QtLocation_GEN_DIR}/qplacereply_wrapper.cpp
${QtLocation_GEN_DIR}/qplaceresult_wrapper.cpp
-${QtLocation_GEN_DIR}/qplacereview_wrapper.cpp
${QtLocation_GEN_DIR}/qplacesearchreply_wrapper.cpp
${QtLocation_GEN_DIR}/qplacesearchrequest_wrapper.cpp
${QtLocation_GEN_DIR}/qplacesearchresult_wrapper.cpp
diff --git a/sources/pyside6/PySide6/QtLocation/typesystem_location.xml b/sources/pyside6/PySide6/QtLocation/typesystem_location.xml
index 34674d4e9..e35b7bd11 100644
--- a/sources/pyside6/PySide6/QtLocation/typesystem_location.xml
+++ b/sources/pyside6/PySide6/QtLocation/typesystem_location.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtLocation">
+<typesystem package="PySide6.QtLocation"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtPositioning/typesystem_positioning.xml" generate="no"/>
<object-type name="QGeoCodeReply">
@@ -47,16 +48,14 @@
<object-type name="QGeoRoutingManager"/>
<object-type name="QGeoRoutingManagerEngine"/>
<object-type name="QGeoServiceProviderFactory"/>
- <object-type name="QGeoServiceProviderFactoryV2" since="5.11"/>
<value-type name="QPlaceAttribute"/>
<value-type name="QPlaceCategory"/>
<value-type name="QPlaceContactDetail"/>
<value-type name="QPlaceContent">
<enum-type name="Type"/>
+ <enum-type name="DataTag" since="6.5"/>
</value-type>
<value-type name="QPlaceContentRequest"/>
- <object-type name="QPlaceEditorial"/>
- <object-type name="QPlaceImage"/>
<object-type name="QPlaceManagerEngine"/>
<object-type name="QPlaceMatchReply"/>
<value-type name="QPlaceMatchRequest"/>
@@ -67,7 +66,6 @@
<enum-type name="Type"/>
</object-type>
<object-type name="QPlaceResult"/>
- <object-type name="QPlaceReview"/>
<object-type name="QPlaceSearchReply"/>
<object-type name="QPlaceSearchRequest">
<enum-type name="RelevanceHint"/>
@@ -77,4 +75,8 @@
</object-type>
<object-type name="QPlaceSearchSuggestionReply"/>
<value-type name="QPlaceSupplier"/>
+
+ <!-- QtQml, QtNetwork are pulled in via QtLocationDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls)|(Qml).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
index 5a6f3e38e..e40c5a2ed 100644
--- a/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtMultimedia)
set(QtMultimedia_SRC
@@ -13,6 +16,7 @@ ${QtMultimedia_GEN_DIR}/qaudio_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcameraformat_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcameradevice_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcamera_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcapturablewindow_wrapper.cpp
${QtMultimedia_GEN_DIR}/qimagecapture_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediacapturesession_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediadevices_wrapper.cpp
@@ -23,10 +27,15 @@ ${QtMultimedia_GEN_DIR}/qmediaplayer_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediarecorder_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediatimerange_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediatimerange_interval_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qscreencapture_wrapper.cpp
${QtMultimedia_GEN_DIR}/qsoundeffect_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qtvideo_wrapper.cpp
${QtMultimedia_GEN_DIR}/qvideoframe_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideoframe_paintoptions_wrapper.cpp
${QtMultimedia_GEN_DIR}/qvideoframeformat_wrapper.cpp
${QtMultimedia_GEN_DIR}/qvideosink_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qwavedecoder_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qwindowcapture_wrapper.cpp
# module is always needed
${QtMultimedia_GEN_DIR}/qtmultimedia_module_wrapper.cpp
@@ -44,11 +53,8 @@ set(QtMultimedia_include_dirs ${QtMultimedia_SOURCE_DIR}
${QtNetwork_GEN_DIR})
set(QtMultimedia_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES})
+
set(QtMultimedia_deps QtCore QtGui QtNetwork)
create_pyside_module(NAME QtMultimedia
diff --git a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
index 7d59b4398..2791f695a 100644
--- a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
+++ b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
@@ -3,16 +3,23 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtMultimedia">
+<typesystem package="PySide6.QtMultimedia"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
<namespace-type name="QAudio">
<enum-type name="Error"/>
- <enum-type name="Mode"/>
<enum-type name="State"/>
<enum-type name="VolumeScale"/>
+ <inject-code class="target" position="end"
+ file="../glue/qtmultimedia.cpp"
+ snippet="qtaudio-namespace-compatibility-alias"/>
+ </namespace-type>
+
+ <namespace-type name="QtVideo" since="6.7">
+ <enum-type name="Rotation"/>
</namespace-type>
<value-type name="QAudioBuffer">
@@ -47,29 +54,31 @@
<object-type name="QAudioOutput"/>
<object-type name="QAudioSource">
- <modify-function signature="start()">
+ <modify-function signature="start()" allow-thread="true">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="start(QIODevice*)">
+ <modify-function signature="start(QIODevice*)" allow-thread="true">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
+ <modify-function signature="stop()" allow-thread="true"/>
</object-type>
<object-type name="QAudioSink">
- <modify-function signature="start()">
+ <modify-function signature="start()" allow-thread="true">
<modify-argument index="return">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
- <modify-function signature="start(QIODevice*)">
+ <modify-function signature="start(QIODevice*)" allow-thread="true">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
</modify-argument>
</modify-function>
+ <modify-function signature="stop()" allow-thread="true"/>
</object-type>
<object-type name="QCamera">
@@ -85,6 +94,9 @@
<value-type name="QCameraDevice">
<enum-type name="Position" since="6.1"/>
</value-type>
+
+ <value-type name="QCapturableWindow" since="6.6"/>
+
<object-type name="QImageCapture">
<enum-type name="Error"/>
<enum-type name="FileFormat"/>
@@ -110,7 +122,7 @@
<enum-type name="MediaStatus"/>
<enum-type name="PlaybackState" since="6.1"/>
<enum-type name="Error"/>
- <enum-type name="Loops" since="6.2.3"/>
+ <enum-type name="Loops" python-type="IntEnum" since="6.2.3"/>
</object-type>
<!-- see qtmultimedia/5773f7214c7430a98dea3974c0597cb3ee0ea7f5 might reappear in 6.3
<object-type name="QMediaPlaylist"/>
@@ -125,6 +137,10 @@
<value-type name="Interval"/>
</value-type>
+ <object-type name="QScreenCapture" since="6.5">
+ <enum-type name="Error"/>
+ </object-type>
+
<object-type name="QSoundEffect">
<enum-type name="Loop"/>
<enum-type name="Status"/>
@@ -138,6 +154,9 @@
<inject-code file="../glue/qtmultimedia.cpp" snippet="qvideoframe-bits"/>
</modify-function>
<modify-function signature="bits(int)const" remove="all"/>
+ <value-type name="PaintOptions">
+ <enum-type name="PaintFlag" flags="PaintFlags"/>
+ </value-type>
</value-type>
<value-type name="QVideoFrameFormat" since="6.1">
<enum-type name="ColorSpace" since="6.4"/>
@@ -148,5 +167,14 @@
<enum-type name="YCbCrColorSpace"/>
</value-type>
+ <object-type name="QWaveDecoder">
+ <!-- No implementation -->
+ <modify-function signature="setIODevice(QIODevice*)" remove="all"/>
+ </object-type>
+
+ <object-type name="QWindowCapture" since="6.6">
+ <enum-type name="Error"/>
+ </object-type>
+
<object-type name="QVideoSink" since="6.1"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt
index 94443b496..c3988551e 100644
--- a/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtMultimediaWidgets)
set(QtMultimediaWidgets_SRC
@@ -23,12 +26,8 @@ set(QtMultimediaWidgets_include_dirs ${QtMultimediaWidgets_SOURCE_DIR}
${QtMultimedia_GEN_DIR})
set(QtMultimediaWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}MultimediaWidgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}MultimediaWidgets_LIBRARIES})
+
set(QtMultimediaWidgets_deps QtCore QtGui QtNetwork QtWidgets QtMultimedia)
diff --git a/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml b/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml
index 8d53e743a..05b4e2456 100644
--- a/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml
+++ b/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtMultimediaWidgets">
+<typesystem package="PySide6.QtMultimediaWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtMultimedia/typesystem_multimedia.xml" generate="no"/>
diff --git a/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt b/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt
index eadd3b982..529e2e86b 100644
--- a/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtNetwork)
set(QtNetwork_DROPPED_ENTRIES )
@@ -15,6 +18,8 @@ ${QtNetwork_GEN_DIR}/qdnstextrecord_wrapper.cpp
${QtNetwork_GEN_DIR}/qhostaddress_wrapper.cpp
${QtNetwork_GEN_DIR}/qhostinfo_wrapper.cpp
${QtNetwork_GEN_DIR}/qhstspolicy_wrapper.cpp
+${QtNetwork_GEN_DIR}/qhttp1configuration_wrapper.cpp
+${QtNetwork_GEN_DIR}/qhttpheaders_wrapper.cpp
${QtNetwork_GEN_DIR}/qhttpmultipart_wrapper.cpp
${QtNetwork_GEN_DIR}/qhttppart_wrapper.cpp
${QtNetwork_GEN_DIR}/qhttp2configuration_wrapper.cpp
@@ -35,7 +40,10 @@ ${QtNetwork_GEN_DIR}/qnetworkproxyfactory_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkproxyquery_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkreply_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkrequest_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkrequestfactory_wrapper.cpp
${QtNetwork_GEN_DIR}/qpassworddigestor_wrapper.cpp
+${QtNetwork_GEN_DIR}/qrestaccessmanager_wrapper.cpp
+${QtNetwork_GEN_DIR}/qrestreply_wrapper.cpp
${QtNetwork_GEN_DIR}/qssl_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslcertificate_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslcertificateextension_wrapper.cpp
@@ -65,11 +73,9 @@ else()
${QtNetwork_GEN_DIR}/qsslerror_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslkey_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslpresharedkeyauthenticator_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslserver_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp
${QtNetwork_GEN_DIR}/qocspresponse_wrapper.cpp)
- if (Qt${QT_MAJOR_VERSION}Network_VERSION VERSION_GREATER_EQUAL 6.4.0)
- list(APPEND QtNetwork_SRC ${QtNetwork_GEN_DIR}/qsslserver_wrapper.cpp)
- endif()
message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SSL classes")
endif()
@@ -79,7 +85,8 @@ if("dtls" IN_LIST QtNetwork_disabled_features)
else()
list(APPEND QtNetwork_SRC
${QtNetwork_GEN_DIR}/qdtls_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qdtlsclientverifier_wrapper.cpp)
+ ${QtNetwork_GEN_DIR}/qdtlsclientverifier_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qdtlsclientverifier_generatorparameters_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding DTLS classes")
endif()
diff --git a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml
index e58eb0ccc..508043626 100644
--- a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml
+++ b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml
@@ -3,24 +3,31 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtNetwork">
+<typesystem package="PySide6.QtNetwork"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <rejection class="dtlsopenssl"/>
+ <rejection class="QTlsPrivate"/>
- <enum-type name="QDtlsError" since="5.12"/>
- <enum-type name="QOcspCertificateStatus" since="5.13"/>
- <enum-type name="QOcspRevocationReason" since="5.13"/>
+ <enum-type name="QDtlsError">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </enum-type>
+ <enum-type name="QOcspCertificateStatus">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </enum-type>
+ <enum-type name="QOcspRevocationReason">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </enum-type>
- <namespace-type name="QPasswordDigestor" since="5.12">
+ <namespace-type name="QPasswordDigestor">
<extra-includes>
<include file-name="qpassworddigestor.h" location="global"/>
</extra-includes>
</namespace-type>
<namespace-type name="QSsl">
- <enum-type name="AlertLevel" since="6.0"/>
- <enum-type name="AlertType" since="6.0"/>
+ <enum-type name="AlertLevel"/>
+ <enum-type name="AlertType"/>
<enum-type name="AlternativeNameEntryType"/>
<enum-type name="EncodingFormat"/>
<enum-type name="ImplementedClass" since="6.1"/>
@@ -35,7 +42,6 @@
</namespace-type>
<rejection class="QIPv6Address" field-name="c"/>
- <rejection class="dtlsopenssl"/>
<object-type name="QAbstractSocket">
<enum-type name="BindFlag" flags="BindMode"/>
@@ -64,18 +70,28 @@
<value-type name="QDnsServiceRecord"/>
<value-type name="QDnsTextRecord"/>
- <object-type name="QDtls" since="5.12">
+ <object-type name="QDtls">
<enum-type name="HandshakeState"/>
+ <configuration condition="QT_CONFIG(dtls)"/>
+ </object-type>
+ <object-type name="QDtlsClientVerifier">
+ <configuration condition="QT_CONFIG(dtls)"/>
+ <value-type name="GeneratorParameters">
+ <configuration condition="QT_CONFIG(dtls)"/>
+ </value-type>
</object-type>
- <object-type name="QDtlsClientVerifier"/>
- <value-type name="QHstsPolicy" since="5.9">
+ <value-type name="QHstsPolicy">
<enum-type name="PolicyFlag" flags="PolicyFlags"/>
</value-type>
+ <value-type name="QHttp1Configuration"/>
+ <value-type name="QHttpHeaders" since="6.7">
+ <enum-type name="WellKnownHeader"/>
+ </value-type>
<object-type name="QHttpMultiPart">
<enum-type name="ContentType"/>
</object-type>
- <value-type name="QHttpPart" since="5.9"/>
+ <value-type name="QHttpPart"/>
<value-type name="QHttp2Configuration"/>
<object-type name="QTcpServer">
@@ -88,15 +104,17 @@
<remove-default-expression/>
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, timeOut)"/>
+ <modify-argument index="return" pyi-type="Tuple[bool, bool]">
+ <replace-type modified-type="(retval, timedOut)"/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
</object-type>
- <value-type name="QOcspResponse" since="5.13"/>
+ <value-type name="QOcspResponse">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </value-type>
<object-type name="QTcpSocket"/>
<object-type name="QUdpSocket">
<modify-function signature="readDatagram(char*,qint64,QHostAddress*,quint16*)" allow-thread="yes">
@@ -111,7 +129,7 @@
<remove-default-expression/>
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QByteArray, PySide6.QtNetwork.QHostAddress, int]">
<replace-type modified-type="(data, address, port)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qudpsocket-readdatagram"/>
@@ -136,8 +154,8 @@
<inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/>
</inject-code>
- <modify-argument index="return">
- <replace-type modified-type="(retval, timeOut)"/>
+ <modify-argument index="return" pyi-type="Tuple[bool, bool]">
+ <replace-type modified-type="(retval, timedOut)"/>
</modify-argument>
</modify-function>
@@ -173,13 +191,13 @@
<enum-type name="TransportMedium" since="6.3"/>
</object-type>
<object-type name="QNetworkCookieJar"/>
- <value-type name="QNetworkDatagram" since="5.8"/>
+ <value-type name="QNetworkDatagram"/>
<object-type name="QNetworkReply">
<enum-type name="NetworkError"/>
</object-type>
<value-type name="QHostAddress">
- <enum-type name="ConversionModeFlag" flags="ConversionMode" since="5.8"/>
+ <enum-type name="ConversionModeFlag" flags="ConversionMode"/>
<enum-type name="SpecialAddress"/>
<!-- ### QHostAddress(QIPv6Address) does this -->
<modify-function signature="QHostAddress(const quint8*)" remove="all"/>
@@ -188,6 +206,8 @@
</value-type>
<value-type name="QHostInfo">
+ <inject-code class="native" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qhostinfo-lookuphost-functor"/>
<enum-type name="HostInfoError"/>
<add-function signature="lookupHost(const QString &amp;,PyCallable)">
<inject-code class="target" position="beginning"
@@ -197,12 +217,14 @@
</value-type>
<value-type name="QNetworkAddressEntry">
- <enum-type name="DnsEligibilityStatus" since="5.11"/>
+ <enum-type name="DnsEligibilityStatus"/>
+ <configuration condition="#ifndef QT_NO_NETWORKINTERFACE"/>
</value-type>
<value-type name="QNetworkInterface">
<enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
- <enum-type name="InterfaceType" since="5.11"/>
+ <enum-type name="InterfaceType"/>
+ <configuration condition="#ifndef QT_NO_NETWORKINTERFACE"/>
</value-type>
<value-type name="QNetworkProxy">
@@ -237,43 +259,193 @@
</value-type>
<value-type name="QNetworkRequest">
<enum-type name="Attribute"/>
- <enum-type name="LoadControl" since="4.7"/>
- <enum-type name="Priority" since="4.7"/>
+ <enum-type name="LoadControl"/>
+ <enum-type name="Priority"/>
<enum-type name="CacheLoadControl"/>
<enum-type name="KnownHeaders"/>
- <enum-type name="RedirectPolicy" since="5.9"/>
- <enum-type name="TransferTimeoutConstant" since="5.15"/>
+ <enum-type name="RedirectPolicy"/>
+ <enum-type name="TransferTimeoutConstant"/>
</value-type>
-
+ <value-type name="QNetworkRequestFactory" since="6.7"/>
<object-type name="QAbstractNetworkCache"/>
<object-type name="QNetworkDiskCache"/>
<value-type name="QNetworkCacheMetaData"/>
- <object-type name="QSctpServer"/>
- <object-type name="QSctpSocket"/>
+ <object-type name="QRestAccessManager" since="6.7">
+ <inject-code class="native" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-functor"/>
+
+ <add-function signature="deleteResource(QNetworkRequest@request@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-callback"/>
+ </add-function>
+
+ <add-function signature="get(QNetworkRequest@request@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-callback"/>
+ </add-function>
+ <add-function signature="get(QNetworkRequest@request@,QByteArray@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="get(QNetworkRequest@request@,QIODevice*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="get(QNetworkRequest@request@,QJsonDocument@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+
+ <add-function signature="head(QNetworkRequest@request@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-callback"/>
+ </add-function>
+
+ <add-function signature="patch(QNetworkRequest@request@,QByteArray@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="patch(QNetworkRequest@request@,QIODevice*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="patch(QNetworkRequest@request@,QJsonDocument@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="patch(QNetworkRequest@request@,QVariantMap@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+
+ <add-function signature="post(QNetworkRequest@request@,QByteArray@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="post(QNetworkRequest@request@,QHttpMultiPart*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="post(QNetworkRequest@request@,QIODevice*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="post(QNetworkRequest@request@,QJsonDocument@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="post(QNetworkRequest@request@,QVariantMap@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+
+ <add-function signature="put(QNetworkRequest@request@,QByteArray@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="put(QNetworkRequest@request@,QHttpMultiPart*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="put(QNetworkRequest@request@,QIODevice*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="put(QNetworkRequest@request@,QJsonDocument@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+ <add-function signature="put(QNetworkRequest@request@,QVariantMap@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-data-callback"/>
+ </add-function>
+
+ <add-function signature="sendCustomRequest(QNetworkRequest@request@,QByteArray@method@,QByteArray@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-method-data-callback"/>
+ </add-function>
+ <add-function signature="sendCustomRequest(QNetworkRequest@request@,QByteArray@method@,QHttpMultiPart*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-method-data-callback"/>
+ </add-function>
+ <add-function signature="sendCustomRequest(QNetworkRequest@request@,QByteArray@method@,QIODevice*@data@,QObject*@context@,PyCallable*@slot@)"
+ return-type="QNetworkReply*">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestaccessmanager-method-data-callback"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QRestReply" since="6.7">
+ <add-function signature="readJson()" return-type="PyObject">
+ <modify-argument index="return"
+ pyi-type="Tuple[Optional[PySide6.QtCore.QJsonDocument],PySide6.QtCore.QJsonParseError]"/>
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp"
+ snippet="qrestreply-readjson"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QSctpServer">
+ <configuration condition="QT_CONFIG(sctp)"/>
+ </object-type>
+ <object-type name="QSctpSocket">
+ <configuration condition="QT_CONFIG(sctp)"/>
+ </object-type>
<!-- The following entries may be present in the system or not. Keep this section organized. -->
<value-type name="QSslCertificate">
- <enum-type name="PatternSyntax" since="5.15"/>
+ <enum-type name="PatternSyntax"/>
<enum-type name="SubjectInfo"/>
+ <configuration condition="QT_CONFIG(ssl)"/>
</value-type>
- <value-type name="QSslCertificateExtension"/>
+ <value-type name="QSslCertificateExtension">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </value-type>
- <value-type name="QSslCipher"/>
+ <value-type name="QSslCipher">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </value-type>
<value-type name="QSslConfiguration">
<enum-type name="NextProtocolNegotiationStatus"/>
+ <configuration condition="QT_CONFIG(ssl)"/>
</value-type>
- <value-type name="QSslDiffieHellmanParameters" since="5.8">
+ <value-type name="QSslDiffieHellmanParameters">
<enum-type name="Error"/>
+ <configuration condition="QT_CONFIG(ssl)"/>
</value-type>
- <value-type name="QSslEllipticCurve"/>
+ <value-type name="QSslEllipticCurve">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </value-type>
<value-type name="QSslError">
<enum-type name="SslError"/>
+ <configuration condition="QT_CONFIG(ssl)"/>
</value-type>
<value-type name="QSslKey"/>
@@ -282,11 +454,16 @@
<enum-type name="PeerVerifyMode"/>
<modify-function signature="connectToHostEncrypted(const QString&amp;,quint16,QFlags&lt;QIODeviceBase::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes"/>
<modify-function signature="waitForEncrypted(int)" allow-thread="yes"/>
+ <configuration condition="QT_CONFIG(ssl)"/>
</object-type>
- <value-type name="QSslPreSharedKeyAuthenticator"/>
+ <value-type name="QSslPreSharedKeyAuthenticator">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </value-type>
- <object-type name="QSslServer" since="6.4"/>
+ <object-type name="QSslServer" since="6.4">
+ <configuration condition="QT_CONFIG(ssl)"/>
+ </object-type>
<!-- The above entries may be present in the system or not. Keep this section organized. -->
</typesystem>
diff --git a/sources/pyside6/PySide6/QtNetworkAuth/CMakeLists.txt b/sources/pyside6/PySide6/QtNetworkAuth/CMakeLists.txt
index 3313c9d3b..4d9498e4d 100644
--- a/sources/pyside6/PySide6/QtNetworkAuth/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtNetworkAuth/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtNetworkAuth)
set(QtNetworkAuth_SRC
@@ -23,8 +26,6 @@ set(QtNetworkAuth_include_dirs ${QtNetworkAuth_SOURCE_DIR}
${QtNetworkAuth_GEN_DIR})
set(QtNetworkAuth_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
${Qt${QT_MAJOR_VERSION}NetworkAuth_LIBRARIES})
set(QtNetworkAuth_deps QtNetwork)
diff --git a/sources/pyside6/PySide6/QtNetworkAuth/typesystem_networkauth.xml b/sources/pyside6/PySide6/QtNetworkAuth/typesystem_networkauth.xml
index a46dd2fca..bedfc5a28 100644
--- a/sources/pyside6/PySide6/QtNetworkAuth/typesystem_networkauth.xml
+++ b/sources/pyside6/PySide6/QtNetworkAuth/typesystem_networkauth.xml
@@ -4,13 +4,16 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtNetworkAuth">
+<typesystem package="PySide6.QtNetworkAuth"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
<object-type name="QAbstractOAuth">
<enum-type name="ContentType"/>
<enum-type name="Error"/>
<enum-type name="Stage"/>
<enum-type name="Status"/>
+ <inject-code class="native" position="beginning" file="../glue/qtnetworkauth.cpp"
+ snippet="qabstractoauth-lookuphost-functor"/>
<modify-function signature="setReplyHandler(QAbstractOAuthReplyHandler*)">
<modify-argument index="1">
<define-ownership class="target" owner="c++"/>
diff --git a/sources/pyside6/PySide6/QtNfc/CMakeLists.txt b/sources/pyside6/PySide6/QtNfc/CMakeLists.txt
index d9cb0e31a..b94249a55 100644
--- a/sources/pyside6/PySide6/QtNfc/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtNfc/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtNfc)
set(QtNfc_SRC
@@ -11,6 +14,7 @@ set(QtNfc_SRC
${QtNfc_GEN_DIR}/qndefnfcurirecord_wrapper.cpp
${QtNfc_GEN_DIR}/qnearfieldmanager_wrapper.cpp
${QtNfc_GEN_DIR}/qnearfieldtarget_wrapper.cpp
+ ${QtNfc_GEN_DIR}/qnearfieldtarget_requestid_wrapper.cpp
# module is always needed
${QtNfc_GEN_DIR}/qtnfc_module_wrapper.cpp)
diff --git a/sources/pyside6/PySide6/QtNfc/typesystem_nfc.xml b/sources/pyside6/PySide6/QtNfc/typesystem_nfc.xml
index be9465901..b548227f0 100644
--- a/sources/pyside6/PySide6/QtNfc/typesystem_nfc.xml
+++ b/sources/pyside6/PySide6/QtNfc/typesystem_nfc.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtNfc">
+<typesystem package="PySide6.QtNfc"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<value-type name="QNdefFilter">
<value-type name="Record"/>
@@ -27,5 +28,8 @@
<enum-type name="AccessMethod" flags="AccessMethods"/>
<enum-type name="Error"/>
<enum-type name="Type"/>
+ <value-type name="RequestId"/>
</object-type>
+ <!-- QtNetwork is pulled in via QtNfcDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls).*' does not have a type entry.*$"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt
index 03c3fbdb0..5bf8b5f3b 100644
--- a/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt
@@ -1,7 +1,14 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtOpenGL)
set(QtOpenGL_DROPPED_ENTRIES)
+set(QtOpenGL_static_sources
+ "${QtOpenGL_SOURCE_DIR}/glue/utils.cpp"
+)
+
set(QtOpenGL_SRC
${QtOpenGL_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp
${QtOpenGL_GEN_DIR}/qopengldebuglogger_wrapper.cpp
@@ -32,39 +39,41 @@ if("opengles2" IN_LIST QtGui_enabled_features)
list(APPEND QtOpenGL_SRC ${QtOpenGL_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
else()
+ list(APPEND QtOpenGL_DROPPED_ENTRIES QOpenGLFunctions_ES2)
list(APPEND QtOpenGL_SRC
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_1_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_2_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_3_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_4_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_5_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_2_0_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_2_1_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_0_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_1_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_2_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_2_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_3_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_3_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_0_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_0_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_1_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_1_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_2_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_2_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_3_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_3_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopenglversionfunctionsfactory_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopengltimemonitor_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopengltimerquery_wrapper.cpp)
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_1_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_2_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_3_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_4_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_1_5_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_2_0_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_2_1_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_0_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_1_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_2_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_2_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_3_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_3_3_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_0_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_0_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_1_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_1_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_2_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_2_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_3_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_3_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopenglversionfunctionsfactory_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopengltimemonitor_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopengltimerquery_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}OpenGL: Adding Desktop OpenGL classes")
endif()
+
configure_file("${QtOpenGL_SOURCE_DIR}/QtOpenGL_global.post.h.in"
"${QtOpenGL_BINARY_DIR}/QtOpenGL_global.post.h" @ONLY)
@@ -78,8 +87,6 @@ set(QtOpenGL_include_dirs ${QtOpenGL_SOURCE_DIR}
${QtOpenGL_GEN_DIR}
)
set(QtOpenGL_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES})
set(QtOpenGL_deps QtGui)
@@ -89,4 +96,5 @@ create_pyside_module(NAME QtOpenGL
DEPS QtOpenGL_deps
TYPESYSTEM_PATH QtOpenGL_SOURCE_DIR
SOURCES QtOpenGL_SRC
+ STATIC_SOURCES QtOpenGL_static_sources
DROPPED_ENTRIES QtOpenGL_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtOpenGL/QtOpenGL_global.post.h.in b/sources/pyside6/PySide6/QtOpenGL/QtOpenGL_global.post.h.in
index 2e6d36b5f..571b245a3 100644
--- a/sources/pyside6/PySide6/QtOpenGL/QtOpenGL_global.post.h.in
+++ b/sources/pyside6/PySide6/QtOpenGL/QtOpenGL_global.post.h.in
@@ -1,9 +1,10 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
#include <QtGui/qtgui-config.h>
-// OpenGL functions are not in the QtGui module header
-#if QT_CONFIG(opengl)
+
+#if QT_CONFIG(opengles2)
+# include <QtOpenGL/qopenglfunctions_es2.h>
+#elif QT_CONFIG(opengl)
# include <QtOpenGL/qopenglfunctions_1_0.h>
# include <QtOpenGL/qopenglfunctions_1_1.h>
# include <QtOpenGL/qopenglfunctions_1_2.h>
@@ -32,6 +33,3 @@
# include <QtOpenGL/qopenglfunctions_4_5_core.h>
# include <QtOpenGL/qopenglversionfunctionsfactory.h>
#endif
-#if QT_CONFIG(opengles2)
-# include <QtOpenGL/qopenglfunctions_es2.h>
-#endif
diff --git a/sources/pyside6/PySide6/QtOpenGL/glue/utils.cpp b/sources/pyside6/PySide6/QtOpenGL/glue/utils.cpp
new file mode 100644
index 000000000..27a8a9fdf
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/glue/utils.cpp
@@ -0,0 +1,40 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include <QtGui/QOpenGLFunctions>
+
+// Return the number of return values of the glGetBoolean/Double/Integerv functions
+// cf https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGet.xhtml
+int glGetVReturnSize(GLenum pname)
+{
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_DEPTH_RANGE:
+ case GL_MAX_VIEWPORT_DIMS:
+#if !QT_CONFIG(opengles2)
+ case GL_POINT_SIZE_RANGE:
+ case GL_SMOOTH_LINE_WIDTH_RANGE:
+ case GL_VIEWPORT_BOUNDS_RANGE:
+#endif
+ return 2;
+ case GL_BLEND_COLOR:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ return 4;
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ return GL_NUM_COMPRESSED_TEXTURE_FORMATS;
+ default:
+ break;
+ }
+ return 1;
+}
+
+// Return the number of return values of the indexed
+// glGetBoolean/Double/Integeri_v functions
+// cf https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGet.xhtml
+int glGetI_VReturnSize(GLenum pname)
+{
+ return pname == GL_VIEWPORT ? 4 : 1;
+}
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_includes.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_includes.xml
new file mode 100644
index 000000000..56ff7bcda
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_includes.xml
@@ -0,0 +1 @@
+<inject-code class="native" position="beginning" file="../glue/qtopengl.cpp" snippet="glgeti-vreturnsize_declaration"/>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_modifications.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_modifications.xml
new file mode 100644
index 000000000..f0e6084cf
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgeti_v_modifications.xml
@@ -0,0 +1,18 @@
+<modify-function signature="glGetBooleani_v(GLenum,GLuint,GLboolean*)">
+ <modify-argument index="return" pyi-type="Union[bool,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglextrafunctions-glgetbooleani-v"/>
+</modify-function>
+<modify-function signature="glGetIntegeri_v(GLenum,GLuint,GLint*)">
+ <modify-argument index="return" pyi-type="Union[int,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglextrafunctions-glgetintegeri-v"/>
+</modify-function>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_includes.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_includes.xml
new file mode 100644
index 000000000..3f48f19b8
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_includes.xml
@@ -0,0 +1,5 @@
+<extra-includes>
+ <include file-name="QtCore/QVarLengthArray" location="global"/>
+ <include file-name="sbkcpptonumpy.h" location="global"/>
+</extra-includes>
+<inject-code class="native" position="beginning" file="../glue/qtopengl.cpp" snippet="glgetvreturnsize_declaration"/>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_modifications.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_modifications.xml
new file mode 100644
index 000000000..b5fab57ba
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_glgetv_modifications.xml
@@ -0,0 +1,36 @@
+<modify-function signature="glGetBooleanv(GLenum,GLboolean*)">
+ <modify-argument index="return" pyi-type="Union[bool,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglfunctions-glgetbooleanv"/>
+</modify-function>
+<modify-function signature="glGetDoublev(GLenum,GLdouble*)">
+ <modify-argument index="return" pyi-type="Union[float,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglfunctions-glgetdoublev"/>
+</modify-function>
+<modify-function signature="glGetFloatv(GLenum,GLfloat*)">
+ <modify-argument index="return" pyi-type="Union[float,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglfunctions-glgetfloatv"/>
+</modify-function>
+<modify-function signature="glGetIntegerv(GLenum,GLint*)">
+ <modify-argument index="return" pyi-type="Union[int,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglfunctions-glgetintegerv"/>
+</modify-function>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml
index 05f2f20a1..efbd16056 100644
--- a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml
@@ -3,32 +3,13 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtOpenGL">
+<typesystem package="PySide6.QtOpenGL"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no" />
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no" />
<load-typesystem name="templates/opengl_common.xml" generate="no" />
- <?if !darwin?>
- <?entity GLint int?>
- <?entity GLuint unsigned int?>
- <?entity GLbyte unsigned char?>
- <?entity GLboolean unsigned char?>
- <?entity GLsizei int?>
- <?entity GLsizeiptr long?>
- <?entity GLintptr long?>
- <?endif?>
-
- <?if darwin?>
- <?entity GLint int32_t?>
- <?entity GLuint uint32_t?>
- <?entity GLbyte uint8_t?>
- <?entity GLboolean uint8_t?>
- <?entity GLsizei int32_t?>
- <?entity GLsizeiptr intptr_t?>
- <?entity GLintptr intptr_t?>
- <?endif?>
-
- <rejection class="^QOpenGL.*$" argument-type="^(const )?GLboolean ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^const GLboolean ?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
@@ -43,44 +24,167 @@
<rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
<rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
<rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
+
+ <!-- Reject any non-const array of the version functions -->
<rejection class="^QOpenGLFunctions.*$" function-name="^glGet(Buffer|VertexAttrib)?Pointer.*$"/>
<rejection class="^QOpenGLFunctions.*$" function-name="^glMultiDrawElements.*$"/>
- <!-- Reject any non-const array of the version functions -->
- <rejection class="^QOpenGLFunctions_\d_\d.*$" argument-type="^GL\w+ ?\*$"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glAreTexturesResident"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateBuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateFramebuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateProgramPipelines"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateQueries"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateRenderbuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateSamplers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateTextures"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateTransformFeedbacks"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glCreateVertexArrays"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glFeedbackBuffer"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenBuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenFramebuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenProgramPipelines"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenQueries"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenRenderbuffers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenSamplers"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenTextures"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenTransformFeedbacks"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGenVertexArrays"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetActiveAtomicCounterBufferiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetActiveSubroutineUniformiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetActiveUniformBlockiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetActiveUniformsiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetAttachedShaders"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetBufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetClipPlane"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetColorTableParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetColorTableParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetConvolutionParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetConvolutionParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetFramebufferAttachmentParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetFramebufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetHistogramParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetHistogramParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetInternalformativ"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetLightfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetLightiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMapdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMapfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMapiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMaterialfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMaterialiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMinmaxParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMinmaxParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetMultisamplefv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetNamedBufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetNamedFramebufferAttachmentParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetNamedFramebufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetNamedRenderbufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnMapdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnMapfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnMapiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnPixelMapfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnPixelMapuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnPixelMapusv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnUniformdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnUniformfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnUniformiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetnUniformuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetPixelMapfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetPixelMapuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetPixelMapusv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetProgramInterfaceiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetProgramiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetProgramPipelineiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetProgramResourceiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetProgramStageiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetQueryIndexediv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetQueryiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetQueryObjectiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetQueryObjectuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetRenderbufferParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetSamplerParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetSamplerParameterIiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetSamplerParameterIuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetSamplerParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetShaderiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetShaderPrecisionFormat"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexEnvfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexEnviv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexGendv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexGenfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexGeniv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexLevelParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexLevelParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexParameterIiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexParameterIuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTexParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureLevelParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureLevelParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureParameterfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureParameterIiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureParameterIuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTextureParameteriv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTransformFeedbacki_v"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetTransformFeedbackiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetUniformdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetUniformfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetUniformiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetUniformSubroutineuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetUniformuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexArrayIndexediv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexArrayiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribfv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribIiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribIuiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribiv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glGetVertexAttribLdv"/>
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" function-name="glSelectBuffer"/>
- <object-type name="QOpenGLBuffer" since="5.0">
+ <object-type name="QOpenGLBuffer">
<enum-type name="Access"/>
<enum-type name="RangeAccessFlag" flags="RangeAccessFlags"/>
<enum-type name="Type"/>
<enum-type name="UsagePattern"/>
+ <modify-function signature="allocate(const void*,int)">
+ <modify-argument index="1" pyi-type="bytes"/>
+ </modify-function>
</object-type>
- <object-type name="QOpenGLDebugLogger" since="5.1">
+ <object-type name="QOpenGLDebugLogger">
<enum-type name="LoggingMode"/>
</object-type>
- <value-type name="QOpenGLDebugMessage" since="5.1">
+ <value-type name="QOpenGLDebugMessage">
<enum-type name="Source" flags="Sources"/>
<enum-type name="Type" flags="Types"/>
<enum-type name="Severity" flags="Severities"/>
</value-type>
- <object-type name="QOpenGLFunctions_1_0" since="5.1">
+ <object-type name="QOpenGLFunctions_1_0">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
</object-type>
- <object-type name="QOpenGLFunctions_1_1" since="5.1">
+ <object-type name="QOpenGLFunctions_1_1">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
&opengl_modifications1_1_compat;
</object-type>
- <object-type name="QOpenGLFunctions_1_2" since="5.1">
+ <object-type name="QOpenGLFunctions_1_2">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
&opengl_modifications1_1_compat;
&opengl_modifications1_2_compat;
</object-type>
- <object-type name="QOpenGLFunctions_1_3" since="5.1">
+ <object-type name="QOpenGLFunctions_1_3">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -88,7 +192,9 @@
&opengl_modifications1_2_compat;
&opengl_modifications1_3_compat;
</object-type>
- <object-type name="QOpenGLFunctions_1_4" since="5.1">
+ <object-type name="QOpenGLFunctions_1_4">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -98,7 +204,9 @@
&opengl_modifications1_4;
&opengl_modifications1_4_compat;
</object-type>
- <object-type name="QOpenGLFunctions_1_5" since="5.1">
+ <object-type name="QOpenGLFunctions_1_5">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -108,7 +216,9 @@
&opengl_modifications1_4;
&opengl_modifications1_4_compat;
</object-type>
- <object-type name="QOpenGLFunctions_2_0" since="5.1">
+ <object-type name="QOpenGLFunctions_2_0">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -120,7 +230,9 @@
&opengl_modifications2_0;
&opengl_modifications2_0_compat;
</object-type>
- <object-type name="QOpenGLFunctions_2_1" since="5.1">
+ <object-type name="QOpenGLFunctions_2_1">
+ &glgetv_includes;
+ &glgetv_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -133,7 +245,11 @@
&opengl_modifications2_0_compat;
&opengl_modifications2_1;
</object-type>
- <object-type name="QOpenGLFunctions_3_0" since="5.1">
+ <object-type name="QOpenGLFunctions_3_0">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -147,7 +263,11 @@
&opengl_modifications2_1;
&opengl_modifications3_0;
</object-type>
- <object-type name="QOpenGLFunctions_3_1" since="5.1">
+ <object-type name="QOpenGLFunctions_3_1">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -155,7 +275,11 @@
&opengl_modifications2_1;
&opengl_modifications3_0;
</object-type>
- <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_3_2_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -169,7 +293,11 @@
&opengl_modifications2_1;
&opengl_modifications3_0;
</object-type>
- <object-type name="QOpenGLFunctions_3_2_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_3_2_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -177,7 +305,11 @@
&opengl_modifications2_1;
&opengl_modifications3_0;
</object-type>
- <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_3_3_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -193,7 +325,11 @@
&opengl_modifications3_3;
&opengl_modifications3_3a;
</object-type>
- <object-type name="QOpenGLFunctions_3_3_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_3_3_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -202,7 +338,11 @@
&opengl_modifications3_0;
&opengl_modifications3_3;
</object-type>
- <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_4_0_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -219,7 +359,11 @@
&opengl_modifications3_3a;
&opengl_modifications4_0;
</object-type>
- <object-type name="QOpenGLFunctions_4_0_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_4_0_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -229,7 +373,11 @@
&opengl_modifications3_3;
&opengl_modifications4_0;
</object-type>
- <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_4_1_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -247,7 +395,11 @@
&opengl_modifications4_1;
&opengl_modifications4_0;
</object-type>
- <object-type name="QOpenGLFunctions_4_1_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_4_1_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -259,7 +411,11 @@
&opengl_modifications4_1;
&opengl_modifications_va;
</object-type>
- <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_4_2_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -277,7 +433,11 @@
&opengl_modifications4_0;
&opengl_modifications4_1;
</object-type>
- <object-type name="QOpenGLFunctions_4_2_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_4_2_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -289,7 +449,11 @@
&opengl_modifications4_1;
&opengl_modifications_va;
</object-type>
- <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1">
+ <object-type name="QOpenGLFunctions_4_3_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -308,7 +472,11 @@
&opengl_modifications4_1;
&opengl_modifications4_3;
</object-type>
- <object-type name="QOpenGLFunctions_4_3_Core" since="5.1">
+ <object-type name="QOpenGLFunctions_4_3_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -321,7 +489,11 @@
&opengl_modifications4_1;
&opengl_modifications_va;
</object-type>
- <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5">
+ <object-type name="QOpenGLFunctions_4_4_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -342,7 +514,11 @@
&opengl_modifications4_4;
&opengl_modifications4_4_core;
</object-type>
- <object-type name="QOpenGLFunctions_4_4_Core" since="5.5">
+ <object-type name="QOpenGLFunctions_4_4_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -357,7 +533,11 @@
&opengl_modifications4_4;
&opengl_modifications4_4_core;
</object-type>
- <object-type name="QOpenGLFunctions_4_5_Compatibility" since="5.5">
+ <object-type name="QOpenGLFunctions_4_5_Compatibility">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_0_compat;
&opengl_modifications1_1;
@@ -379,7 +559,11 @@
&opengl_modifications4_4_core;
&opengl_modifications4_5;
</object-type>
- <object-type name="QOpenGLFunctions_4_5_Core" since="5.5">
+ <object-type name="QOpenGLFunctions_4_5_Core">
+ &glgetv_includes;
+ &glgeti_v_includes;
+ &glgetv_modifications;
+ &glgeti_v_modifications;
&opengl_modifications1_0;
&opengl_modifications1_1;
&opengl_modifications1_4;
@@ -395,30 +579,58 @@
&opengl_modifications4_5;
&opengl_modifications_va;
</object-type>
- <object-type name="QOpenGLFunctions_ES2" since="5.1">
+ <object-type name="QOpenGLFunctions_ES2">
&opengl_modifications1_0;
&opengl_modifications1_1;
</object-type>
<object-type name="QOpenGLVersionFunctionsFactory">
+ <extra-includes>
+ <include file-name="QtOpenGL/qopenglfunctions_1_0.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_1_1.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_1_2.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_1_3.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_1_4.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_1_5.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_2_0.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_2_1.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_0.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_1.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_2_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_2_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_3_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_3_3_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_0_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_0_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_1_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_1_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_2_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_2_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_3_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_3_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_4_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_4_core.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_5_compatibility.h" location="global"/>
+ <include file-name="QtOpenGL/qopenglfunctions_4_5_core.h" location="global"/>
+ </extra-includes>
<modify-function signature="get(const QOpenGLVersionProfile &amp;,QOpenGLContext *)">
<inject-code class="target" position="beginning" file="../glue/qtopengl.cpp"
snippet="qopenglversionfunctionsfactory-get"/>
</modify-function>
</object-type>
- <object-type name="QOpenGLFramebufferObject" since="5.0">
+ <object-type name="QOpenGLFramebufferObject">
<enum-type name="Attachment"/>
- <enum-type name="FramebufferRestorePolicy" since="5.7"/>
+ <enum-type name="FramebufferRestorePolicy"/>
</object-type>
<value-type name="QOpenGLFramebufferObjectFormat"/>
- <object-type name="QAbstractOpenGLFunctions" since="5.1"/>
- <value-type name="QOpenGLPixelTransferOptions"/>
- <object-type name="QOpenGLShader" since="5.0">
+ <object-type name="QAbstractOpenGLFunctions"/>
+ <value-type name="QOpenGLPixelTransferOptions"/>
+ <object-type name="QOpenGLShader">
<enum-type name="ShaderTypeBit" flags="ShaderType"/>
</object-type>
<object-type name="QOpenGLPaintDevice"/>
- <object-type name="QOpenGLShaderProgram" since="5.0">
+ <object-type name="QOpenGLShaderProgram">
<modify-function signature="setAttributeArray(int,const float*,int,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
@@ -434,19 +646,19 @@
<modify-function signature="setUniformValueArray(int,const float*,int,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(int,const &GLint;*,int)">
+ <modify-function signature="setUniformValueArray(int,const GLint*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(int,const &GLuint;*,int)">
+ <modify-function signature="setUniformValueArray(int,const GLuint*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<modify-function signature="setUniformValueArray(const char*,const float*,int,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*,const &GLint;*,int)">
+ <modify-function signature="setUniformValueArray(const char*,const GLint*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
- <modify-function signature="setUniformValueArray(const char*,const &GLuint;*,int)">
+ <modify-function signature="setUniformValueArray(const char*,const GLuint*,int)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<!-- Add explicit signatures for the setUniformValue functions -->
@@ -455,17 +667,17 @@
<add-function signature="setUniformValue1f(const char*, float)" return-type="void">
<inject-code file="../glue/qtopengl.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
</add-function>
- <add-function signature="setUniformValue1i(const char*, &GLint;)" return-type="void">
+ <add-function signature="setUniformValue1i(const char*, GLint)" return-type="void">
<inject-code file="../glue/qtopengl.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
</add-function>
- <add-function signature="setUniformValue1f(&GLint;, float)" return-type="void">
+ <add-function signature="setUniformValue1f(GLint, float)" return-type="void">
<inject-code file="../glue/qtopengl.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
</add-function>
- <add-function signature="setUniformValue1i(&GLint;, &GLint;)" return-type="void">
+ <add-function signature="setUniformValue1i(GLint, GLint)" return-type="void">
<inject-code file="../glue/qtopengl.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
</add-function>
</object-type>
- <object-type name="QOpenGLTexture" since="5.2">
+ <object-type name="QOpenGLTexture">
<enum-type name="BindingTarget"/>
<enum-type name="CoordinateDirection"/>
<enum-type name="ComparisonFunction"/>
@@ -491,16 +703,21 @@
<object-type name="QOpenGLTextureBlitter">
<enum-type name="Origin"/>
</object-type>
- <object-type name="QOpenGLTimeMonitor" since="5.1"/>
- <object-type name="QOpenGLTimerQuery" since="5.1"/>
- <object-type name="QOpenGLWindow" since="5.4">
+ <object-type name="QOpenGLTimeMonitor"/>
+ <object-type name="QOpenGLTimerQuery"/>
+ <object-type name="QOpenGLWindow">
<enum-type name="UpdateBehavior"/>
</object-type>
- <value-type name="QOpenGLVersionProfile" since="5.1"/>
+ <value-type name="QOpenGLVersionProfile"/>
<object-type name="QOpenGLVertexArrayObject">
- <object-type name="Binder"/>
+ <object-type name="Binder">
+ <add-function signature="__enter__()" return-type="QOpenGLVertexArrayObject::Binder">
+ <inject-code file="../glue/qtopengl.cpp" snippet="vao-binder-enter"/>
+ </add-function>
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
+ <inject-code file="../glue/qtopengl.cpp" snippet="vao-binder-exit"/>
+ </add-function>
+ </object-type>
</object-type>
- <suppress-warning text="^There's no user provided way.*QOpenGLFunctions_\d_\d.*::glIndex.*$"/>
-
</typesystem>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications1_0_compat.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications1_0_compat.xml
index dca124ccc..a5f8ee77a 100644
--- a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications1_0_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications1_0_compat.xml
@@ -6,7 +6,7 @@
<modify-function signature="^glColor[34][a-z]{1,2}v\(.*$">
<modify-argument index="1"><array/></modify-argument>
</modify-function>
-<modify-function signature="glClipPlane(&GLuint;,const double *)">
+<modify-function signature="glClipPlane(GLenum,const GLdouble*)">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<modify-function signature="^glEvalCoord\d[a-z]{1,2}v\(.*$">
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_1.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_1.xml
index 6458b305a..0fb6cd49a 100644
--- a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_1.xml
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_1.xml
@@ -5,6 +5,24 @@
<modify-function signature="^gl(DepthRange|Scissor|Viewport)Arrayv\(.*$">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
+<modify-function signature="glGetDoublei_v(GLenum,GLuint,GLdouble*)">
+ <modify-argument index="return" pyi-type="Union[float,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglextrafunctions-glgetdoublei-v"/>
+</modify-function>
+<modify-function signature="glGetFloati_v(GLenum,GLuint,GLfloat*)">
+ <modify-argument index="return" pyi-type="Union[float,numpy.ndarray]">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qopenglextrafunctions-glgetfloati-v"/>
+</modify-function>
<modify-function signature="^glProgramUniform\du?[dfi]v\(.*$">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
@@ -17,6 +35,6 @@
<modify-function signature="^gl(Scissor|Viewport)Indexedf?v\(.*$">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
-<modify-function signature="glShaderBinary(&GLint;,const &GLuint;*,&GLuint;,const void *,&GLint;)">
+<modify-function signature="^glShaderBinary\(GLsizei,const GLuint\*,.*$">
<modify-argument index="2"><array/></modify-argument>
</modify-function>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_4.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_4.xml
index 8087ba071..cf90e4e0b 100644
--- a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_4.xml
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_4.xml
@@ -5,12 +5,12 @@
<modify-function signature="^glBindBuffersBase\(.*$">
<modify-argument index="4"><array/></modify-argument>
</modify-function>
-<modify-function signature="glBindBuffersRange(&GLuint;, &GLuint;,&GLint;,const &GLuint; *,const &GLintptr;*,const &GLsizeiptr;*)">
+<modify-function signature="glBindBuffersRange(GLenum,GLuint,GLsizei,const GLuint*,const GLintptr*,const GLsizeiptr*)">
<modify-argument index="4"><array/></modify-argument>
<modify-argument index="5"><array/></modify-argument>
<modify-argument index="6"><array/></modify-argument>
</modify-function>
-<modify-function signature="glBindVertexBuffers(&GLuint;,&GLint;,const &GLuint; *,const &GLintptr;*,const &GLsizei;*)">
+<modify-function signature="glBindVertexBuffers(GLuint,GLsizei,const GLuint*,const GLintptr*,const GLsizei*)">
<modify-argument index="3"><array/></modify-argument>
<modify-argument index="4"><array/></modify-argument>
<modify-argument index="5"><array/></modify-argument>
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_5.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_5.xml
index 055025080..826727736 100644
--- a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_5.xml
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl_modifications4_5.xml
@@ -14,7 +14,7 @@
<modify-function signature="^glTextureParameterI?u?[fi]v\(.*$">
<modify-argument index="3"><array/></modify-argument>
</modify-function>
-<modify-function signature="glVertexArrayVertexBuffers(&GLuint;, &GLuint;,&GLsizei;,const &GLuint; *,const &GLintptr;*,const &GLsizei;*)">
+<modify-function signature="glVertexArrayVertexBuffers(GLuint, GLuint,GLsizei,const GLuint *,const GLintptr*,const GLsizei*)">
<modify-argument index="4"><array/></modify-argument>
<modify-argument index="5"><array/></modify-argument>
<modify-argument index="6"><array/></modify-argument>
diff --git a/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt
index b8b6664b5..8c7386130 100644
--- a/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtOpenGLWidgets)
set(QtOpenGLWidgets_SRC
@@ -18,10 +21,6 @@ set(QtOpenGLWidgets_include_dirs ${QtOpenGLWidgets_SOURCE_DIR}
${QtOpenGLWidgets_GEN_DIR})
set(QtOpenGLWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}OpenGLWidgets_LIBRARIES})
set(QtOpenGLWidgets_deps QtOpenGL QtWidgets)
diff --git a/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml b/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml
index 092902402..1e308a3f2 100644
--- a/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml
+++ b/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml
@@ -3,12 +3,14 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtOpenGLWidgets">
+<typesystem package="PySide6.QtOpenGLWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<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" />
<object-type name="QOpenGLWidget">
<enum-type name="UpdateBehavior"/>
+ <enum-type name="TargetBuffer" since="6.5"/>
</object-type>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtPdf/CMakeLists.txt b/sources/pyside6/PySide6/QtPdf/CMakeLists.txt
new file mode 100644
index 000000000..5b9c1457d
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPdf/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+project(QtPdf)
+
+set(QtPdf_SRC
+${QtPdf_GEN_DIR}/qpdfbookmarkmodel_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfdocument_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfdocumentrenderoptions_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfpagerenderer_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdflink_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdflinkmodel_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfpagenavigator_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfsearchmodel_wrapper.cpp
+${QtPdf_GEN_DIR}/qpdfselection_wrapper.cpp
+# module is always needed
+${QtPdf_GEN_DIR}/qtpdf_module_wrapper.cpp
+)
+
+set(QtPdf_include_dirs ${QtPdf_SOURCE_DIR}
+ ${QtPdf_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtNetwork_GEN_DIR})
+
+set(QtPdf_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Pdf_LIBRARIES})
+
+set(QtPdf_deps QtCore QtGui QtNetwork)
+
+create_pyside_module(NAME QtPdf
+ INCLUDE_DIRS QtPdf_include_dirs
+ LIBRARIES QtPdf_libraries
+ DEPS QtPdf_deps
+ TYPESYSTEM_PATH QtPdf_SOURCE_DIR
+ SOURCES QtPdf_SRC
+ TYPESYSTEM_NAME ${QtPdf_BINARY_DIR}/typesystem_pdf.xml)
diff --git a/sources/pyside6/PySide6/QtPdf/typesystem_pdf.xml b/sources/pyside6/PySide6/QtPdf/typesystem_pdf.xml
new file mode 100644
index 000000000..e008e4880
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPdf/typesystem_pdf.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtPdf"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <object-type name="QPdfBookmarkModel">
+ <enum-type name="Role" python-type="IntEnum"/>
+ </object-type>
+ <object-type name="QPdfDocument">
+ <enum-type name="Status"/>
+ <enum-type name="Error"/>
+ <enum-type name="MetaDataField"/>
+ <enum-type name="PageModelRole"/>
+ </object-type>
+ <value-type name="QPdfDocumentRenderOptions">
+ <enum-type name="RenderFlag" flags="RenderFlags" since="6.5"/>
+ <enum-type name="Rotation" since="6.5"/>
+ </value-type>
+ <object-type name="QPdfPageRenderer">
+ <enum-type name="RenderMode"/>
+ </object-type>
+ <value-type name="QPdfLink"/>
+ <object-type name="QPdfPageNavigator"/>
+ <object-type name="QPdfSearchModel">
+ <enum-type name="Role"/>
+ </object-type>
+ <object-type name="QPdfLinkModel" since="6.6">
+ <enum-type name="Role"/>
+ </object-type>
+ <object-type name="QPdfSelection"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtPdfWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtPdfWidgets/CMakeLists.txt
new file mode 100644
index 000000000..de1335f8a
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPdfWidgets/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+project(QtPdfWidgets)
+
+set(QtPdfWidgets_SRC
+${QtPdfWidgets_GEN_DIR}/qpdfpageselector_wrapper.cpp
+${QtPdfWidgets_GEN_DIR}/qpdfview_wrapper.cpp
+# module is always needed
+${QtPdfWidgets_GEN_DIR}/qtpdfwidgets_module_wrapper.cpp
+)
+
+set(QtPdfWidgets_include_dirs ${QtPdfWidgets_SOURCE_DIR}
+ ${QtPdfWidgets_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Pdf_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${QtPdf_GEN_DIR})
+
+set(QtPdfWidgets_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}PdfWidgets_LIBRARIES})
+
+set(QtPdfWidgets_deps QtCore QtGui QtNetwork QtWidgets QtPdf)
+
+create_pyside_module(NAME QtPdfWidgets
+ INCLUDE_DIRS QtPdfWidgets_include_dirs
+ LIBRARIES QtPdfWidgets_libraries
+ DEPS QtPdfWidgets_deps
+ TYPESYSTEM_PATH QtPdfWidgets_SOURCE_DIR
+ SOURCES QtPdfWidgets_SRC
+ TYPESYSTEM_NAME ${QtPdfWidgets_BINARY_DIR}/typesystem_pdfwidgets.xml)
diff --git a/sources/pyside6/PySide6/QtPdfWidgets/typesystem_pdfwidgets.xml b/sources/pyside6/PySide6/QtPdfWidgets/typesystem_pdfwidgets.xml
new file mode 100644
index 000000000..5df72075c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPdfWidgets/typesystem_pdfwidgets.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtPdfWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
+ <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"/>
+ <load-typesystem name="QtPdf/typesystem_pdf.xml" generate="no"/>
+ <object-type name="QPdfPageSelector" since="6.6"/>
+ <object-type name="QPdfView">
+ <enum-type name="PageMode"/>
+ <enum-type name="ZoomMode"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt b/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt
index 125c18ce5..cad6dcb74 100644
--- a/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtPositioning)
set(QtPositioning_OPTIONAL_SRC )
@@ -20,6 +23,7 @@ ${QtPositioning_GEN_DIR}/qgeosatelliteinfo_wrapper.cpp
${QtPositioning_GEN_DIR}/qgeosatelliteinfosource_wrapper.cpp
${QtPositioning_GEN_DIR}/qgeoshape_wrapper.cpp
${QtPositioning_GEN_DIR}/qnmeapositioninfosource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qnmeasatelliteinfosource_wrapper.cpp
# module is always needed
${QtPositioning_GEN_DIR}/qtpositioning_module_wrapper.cpp
)
@@ -43,3 +47,14 @@ create_pyside_module(NAME QtPositioning
TYPESYSTEM_PATH QtPositioning_SOURCE_DIR
SOURCES QtPositioning_SRC
DROPPED_ENTRIES QtPositioning_DROPPED_ENTRIES)
+
+if (APPLE)
+ # The QtLocation permission plugin cannot be linked to QtCore.abi3.so because for a framework
+ # build of Qt, the QtCore framework bundle must be loaded before calling
+ # Q_IMPORT_PLUGIN(QDarwinLocationPermissionPlugin)
+ set(permission_plugin_name "QDarwinLocationPermissionPlugin")
+ set(permission_plugin "${QT_CMAKE_EXPORT_NAMESPACE}::${permission_plugin_name}")
+ set_target_properties(QtPositioning PROPERTIES "_qt_has_${permission_plugin_name}_usage_description" TRUE)
+ # importing the plugin
+ qt6_import_plugins(QtPositioning INCLUDE ${permission_plugin})
+endif()
diff --git a/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml b/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml
index 757380707..8dac3f00d 100644
--- a/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml
+++ b/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml
@@ -3,8 +3,11 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtPositioning">
+<typesystem package="PySide6.QtPositioning"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <inject-code class="native" position="beginning" file="../glue/qtpositioning.cpp"
+ snippet="darwin_location_permission_plugin"/>
<value-type name="QGeoAddress"/>
<value-type name="QGeoAreaMonitorInfo"/>
<object-type name="QGeoAreaMonitorSource">
@@ -18,7 +21,7 @@
<enum-type name="CoordinateFormat"/>
</value-type>
<value-type name="QGeoPath"/>
- <value-type name="QGeoPolygon" since="5.10"/>
+ <value-type name="QGeoPolygon"/>
<value-type name="QGeoPositionInfo">
<enum-type name="Attribute"/>
</value-type>
@@ -41,4 +44,8 @@
<object-type name="QNmeaPositionInfoSource">
<enum-type name="UpdateMode"/>
</object-type>
+ <object-type name="QNmeaSatelliteInfoSource">
+ <enum-type name="UpdateMode"/>
+ <enum-type name="SatelliteInfoParseStatus"/>
+ </object-type>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt b/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt
index 70a3d8f67..fb0db5f83 100644
--- a/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtPrintSupport)
set(QtPrintSupport_SRC
@@ -22,14 +25,11 @@ set(QtPrintSupport_include_dirs ${QtPrintSupport_SOURCE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
+ ${QtWidgets_GEN_DIR})
+
set(QtPrintSupport_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES})
+
set(QtPrintSupport_deps QtWidgets)
create_pyside_module(NAME QtPrintSupport
INCLUDE_DIRS QtPrintSupport_include_dirs
diff --git a/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml
index 58d4a54b3..46973a5f9 100644
--- a/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml
+++ b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtPrintSupport">
+<typesystem package="PySide6.QtPrintSupport"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<load-typesystem name="QtPrintSupport/typesystem_printsupport_common.xml" generate="yes"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtQml/CMakeLists.txt b/sources/pyside6/PySide6/QtQml/CMakeLists.txt
index a2a0af2cd..87de1d7dd 100644
--- a/sources/pyside6/PySide6/QtQml/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtQml/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtQml)
qt_wrap_cpp(QPYQMLPARSERSTATUS_MOC "${pyside6_SOURCE_DIR}/qpyqmlparserstatus.h")
@@ -60,8 +63,6 @@ set(QtQml_include_dirs ${QtQml_SOURCE_DIR}
${QtQml_GEN_DIR})
set(QtQml_libraries pyside6 pyside6qml
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES})
set(QtQml_deps QtNetwork)
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp
index d498f5bb0..6e403ab72 100644
--- a/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlvolatilebool.cpp
@@ -3,6 +3,7 @@
#include "pysideqmlvolatilebool.h"
+#include <pep384ext.h>
#include <signature.h>
#include <QtCore/QDebug>
@@ -30,8 +31,7 @@ QtQml_VolatileBoolObject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (ok < 0)
return nullptr;
- QtQml_VolatileBoolObject *self
- = reinterpret_cast<QtQml_VolatileBoolObject *>(type->tp_alloc(type, 0));
+ auto *self = PepExt_TypeCallAlloc<QtQml_VolatileBoolObject>(type, 0);
if (self != nullptr)
self->flag = new AtomicBool(ok);
@@ -113,25 +113,31 @@ QtQml_VolatileBoolObject_str(QtQml_VolatileBoolObject *self)
return s;
}
-static PyType_Slot QtQml_VolatileBoolType_slots[] = {
- {Py_tp_repr, reinterpret_cast<void *>(QtQml_VolatileBoolObject_repr)},
- {Py_tp_str, reinterpret_cast<void *>(QtQml_VolatileBoolObject_str)},
- {Py_tp_methods, reinterpret_cast<void *>(QtQml_VolatileBoolObject_methods)},
- {Py_tp_new, reinterpret_cast<void *>(QtQml_VolatileBoolObject_new)},
- {Py_tp_dealloc, reinterpret_cast<void *>(QtQml_VolatileBoolObject_dealloc)},
- {0, 0}
-};
-static PyType_Spec QtQml_VolatileBoolType_spec = {
- "2:PySide6.QtQml.VolatileBool",
- sizeof(QtQml_VolatileBoolObject),
- 0,
- Py_TPFLAGS_DEFAULT,
- QtQml_VolatileBoolType_slots,
-};
+static PyTypeObject *createVolatileBoolType()
+{
+ PyType_Slot QtQml_VolatileBoolType_slots[] = {
+ {Py_tp_repr, reinterpret_cast<void *>(QtQml_VolatileBoolObject_repr)},
+ {Py_tp_str, reinterpret_cast<void *>(QtQml_VolatileBoolObject_str)},
+ {Py_tp_methods, reinterpret_cast<void *>(QtQml_VolatileBoolObject_methods)},
+ {Py_tp_new, reinterpret_cast<void *>(QtQml_VolatileBoolObject_new)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(QtQml_VolatileBoolObject_dealloc)},
+ {0, 0}
+ };
+
+ PyType_Spec QtQml_VolatileBoolType_spec = {
+ "2:PySide6.QtQml.VolatileBool",
+ sizeof(QtQml_VolatileBoolObject),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ QtQml_VolatileBoolType_slots,
+ };
+
+ return SbkType_FromSpec(&QtQml_VolatileBoolType_spec);
+}
PyTypeObject *QtQml_VolatileBool_TypeF(void)
{
- static auto *type = SbkType_FromSpec(&QtQml_VolatileBoolType_spec);
+ static auto *type = createVolatileBoolType();
return type;
}
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
index c59c353be..6a739bbdf 100644
--- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
+++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
@@ -3,20 +3,23 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtQml">
+<typesystem package="PySide6.QtQml"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+ <rejection class="QQmlPrivate"/>
+
<inject-code class="target" position="declaration">
// Volatile Bool Ptr type definition for QQmlIncubationController::incubateWhile(std::atomic&lt;bool&gt; *, int)
#include &lt;atomic&gt;
using AtomicBool = std::atomic&lt;bool&gt;;
- typedef struct {
+ struct QtQml_VolatileBoolObject {
PyObject_HEAD
AtomicBool *flag;
- } QtQml_VolatileBoolObject;
+ };
</inject-code>
<inject-code class="native" position="beginning">
@@ -35,7 +38,7 @@
in generator tests folder. -->
</primitive-type>
- <enum-type name="QQmlModuleImportSpecialVersions" since="6.0"/>
+ <enum-type name="QQmlModuleImportSpecialVersions" doc-file="qqmlengine"/>
<!-- expose QQmlIncubationController::incubateWhile() (see
QtQml_VolatileBoolTypeF/pysideqmlvolatilebool.h) -->
@@ -43,33 +46,51 @@
<value-type name="atomic" generate="no"/>
</namespace-type>
- <add-function signature="qmlAttachedPropertiesObject(PyTypeObject*,QObject*,bool=true)"
+ <add-function signature="qmlAttachedPropertiesObject(PyTypeObject*@type_obj@,QObject*,bool=true)"
return-type="QObject*">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlattachedpropertiesobject"/>
</add-function>
- <add-function signature="qmlRegisterType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
+ <add-function signature="qmlRegisterType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistertype"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregistertype"/>
+ <modify-argument index="2" pyi-type="str"/>
</add-function>
- <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*,PyObject*)" return-type="int">
+ <add-function signature="qmlRegisterSingletonType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_callback"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregistersingletontype_qobject_callback"/>
+ <modify-argument index="2" pyi-type="str"/>
</add-function>
- <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
+ <add-function signature="qmlRegisterSingletonType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_nocallback"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregistersingletontype_qobject_nocallback"/>
+ <modify-argument index="2" pyi-type="str"/>
</add-function>
- <add-function signature="qmlRegisterSingletonType(const char*,int,int,const char*,PyObject*)" return-type="int">
+ <add-function signature="qmlRegisterSingletonType(const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qjsvalue"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregistersingletontype_qjsvalue"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
- <add-function signature="qmlRegisterSingletonInstance(PyTypeObject,const char*,int,int,const char*,PyObject*)" return-type="int">
+ <add-function signature="qmlRegisterSingletonInstance(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletoninstance"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregistersingletoninstance"/>
+ <modify-argument index="2" pyi-type="str"/>
</add-function>
- <add-function signature="qmlRegisterUncreatableType(PyTypeObject,const char*,int,int,const char*,const char*)" return-type="int">
+ <add-function signature="qmlRegisterUncreatableType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,const char*@message@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregisteruncreatabletype"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qmlregisteruncreatabletype"/>
+ <modify-argument index="2" pyi-type="str"/>
</add-function>
<add-function signature="QmlElement(PyObject*)" return-type="PyObject*">
@@ -89,7 +110,7 @@
<modify-argument index="return" pyi-type="Optional[PySide6.QtQml.QJSEngine]"/>
</modify-function>
</function>
- <function signature="qmlClearTypeRegistrations()"/>
+ <function signature="qmlClearTypeRegistrations()" doc-file="qqmlengine"/>
<function signature="qmlContext(const QObject*)">
<modify-function>
<modify-argument index="return" pyi-type="Optional[PySide6.QtQml.QQmlContext]"/>
@@ -100,9 +121,9 @@
<modify-argument index="return" pyi-type="Optional[PySide6.QtQml.QQmlEngine]"/>
</modify-function>
</function>
- <function signature="qmlProtectModule(const char*,int)"/>
- <function signature="qmlRegisterModule(const char*,int,int)"/>
- <function signature="qmlTypeId(const char*,int,int,const char*)"/>
+ <function signature="qmlProtectModule(const char*,int)" doc-file="qqmlengine"/>
+ <function signature="qmlRegisterModule(const char*,int,int)" doc-file="qqmlengine"/>
+ <function signature="qmlTypeId(const char*,int,int,const char*)" doc-file="qqmlengine"/>
<function signature="qmlRegisterType(const QUrl &amp;,const char *,int,int,const char *)"/>
<function signature="qmlRegisterSingletonType(const QUrl &amp;,const char *,int,int,const char *)"/>
<function signature="qmlRegisterUncreatableMetaObject(const QMetaObject&amp;,const char*,int,int, const char*,const QString&amp;)"/>
@@ -116,8 +137,8 @@
<inject-code class="target" position="end" file="../glue/qtqml.cpp" snippet="init"/>
<object-type name="QJSEngine">
- <enum-type name="Extension" flags="Extensions" since="5.6"/>
- <enum-type name="ObjectOwnership" since="6.0"/>
+ <enum-type name="Extension" flags="Extensions"/>
+ <enum-type name="ObjectOwnership"/>
<add-function signature="toScriptValue(const QVariant&amp;)" return-type="QJSValue">
<inject-code class="target" position="end" file="../glue/qtqml.cpp" snippet="qjsengine-toscriptvalue"/>
</add-function>
@@ -129,7 +150,7 @@
<enum-type name="Type"/>
</value-type>
<value-type name="QJSValue">
- <enum-type name="ErrorType" since="5.12"/>
+ <enum-type name="ErrorType"/>
<enum-type name="SpecialValue"/>
<enum-type name="ObjectConversionBehavior" since="6.1"/>
</value-type>
@@ -149,6 +170,7 @@
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qfile-path-1"/>
</modify-function>
<modify-function signature="load(const QUrl &amp;)" allow-thread="yes" overload-number="2"/>
+ <modify-function signature="loadFromModule(QAnyStringView,QAnyStringView)" allow-thread="yes"/>
</object-type>
<object-type name="QQmlComponent">
<enum-type name="CompilationMode"/>
@@ -159,6 +181,10 @@
<modify-function signature="QQmlComponent(QQmlEngine*,QString,QQmlComponent::CompilationMode,QObject*)" allow-thread="yes"/>
<modify-function signature="QQmlComponent(QQmlEngine*,QUrl,QObject*)" allow-thread="yes"/>
<modify-function signature="QQmlComponent(QQmlEngine*,QUrl,QQmlComponent::CompilationMode,QObject*)" allow-thread="yes"/>
+ <modify-function signature="loadFromModule(QAnyStringView,QAnyStringView,QQmlComponent::CompilationMode)" allow-thread="yes"/>
+ <modify-function signature="loadUrl(QUrl)" allow-thread="yes"/>
+ <modify-function signature="loadUrl(QUrl,QQmlComponent::CompilationMode)" allow-thread="yes"/>
+ <modify-function signature="setData(QByteArray,QUrl)" allow-thread="yes"/>
</object-type>
<object-type name="QQmlContext">
<value-type name="PropertyPair"/>
@@ -186,6 +212,30 @@
<modify-argument index="1"><replace-type modified-type="PyPathLike"/></modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qfile-path-1"/>
</modify-function>
+ <add-function signature="singletonInstance(int@qmlTypeId@)"
+ return-type="QObject*">
+ <!-- Suppress return value heuristics -->
+ <modify-argument index="return"
+ pyi-type="Union[PySide6.QtCore.QObject, PySide6.QtQml.QJSValue, None]">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" file="../glue/qtqml.cpp"
+ snippet="qqmlengine-singletoninstance-qmltypeid"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qqmlengine-singletoninstance-qmltypeid"/>
+ </add-function>
+ <add-function signature="singletonInstance(QString@uri@,QString@typeName@)"
+ return-type="QObject*">
+ <!-- Suppress return value heuristics -->
+ <modify-argument index="return"
+ pyi-type="Union[PySide6.QtCore.QObject, PySide6.QtQml.QJSValue, None]">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" file="../glue/qtqml.cpp"
+ snippet="qqmlengine-singletoninstance-typename"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ snippet="qqmlengine-singletoninstance-typename"/>
+ </add-function>
</object-type>
<object-type name="QQmlExpression">
@@ -193,7 +243,7 @@
<modify-argument index="1">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[Any, bool]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -255,7 +305,7 @@
<modify-argument index="1">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -266,7 +316,7 @@
<modify-argument index="1">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, bool]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
diff --git a/sources/pyside6/PySide6/QtQuick/CMakeLists.txt b/sources/pyside6/PySide6/QtQuick/CMakeLists.txt
index 22d65d989..775230242 100644
--- a/sources/pyside6/PySide6/QtQuick/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtQuick/CMakeLists.txt
@@ -1,11 +1,24 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtQuick)
+set(QtQuick_DROPPED_ENTRIES)
+
set(QtQuick_registerType "${QtQuick_SOURCE_DIR}/pysidequickregistertype.cpp")
+# Exclude sources that have clashing static helper functions named "renderstate_..."
+set(QtQuick_SRC_UNITY_EXCLUDED_SRC
+ ${QtQuick_GEN_DIR}/qsgrendernode_renderstate_wrapper.cpp
+ ${QtQuick_GEN_DIR}/qsgmaterialshader_renderstate_wrapper.cpp
+)
+
+set_property(SOURCE ${QtQuick_SRC_UNITY_EXCLUDED_SRC}
+ PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
+
set(QtQuick_SRC
+${QtQuick_SRC_UNITY_EXCLUDED_SRC}
${QtQuick_GEN_DIR}/qquickasyncimageprovider_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickframebufferobject_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickframebufferobject_renderer_wrapper.cpp
${QtQuick_GEN_DIR}/qquickgraphicsconfiguration_wrapper.cpp
${QtQuick_GEN_DIR}/qquickgraphicsdevice_wrapper.cpp
${QtQuick_GEN_DIR}/qquicktexturefactory_wrapper.cpp
@@ -19,9 +32,12 @@ ${QtQuick_GEN_DIR}/qsharedpointer_qquickitemgrabresult_wrapper.cpp
${QtQuick_GEN_DIR}/qquickpainteditem_wrapper.cpp
${QtQuick_GEN_DIR}/qquickrendercontrol_wrapper.cpp
${QtQuick_GEN_DIR}/qquickrendertarget_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickrhiitemrenderer_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickrhiitem_wrapper.cpp
${QtQuick_GEN_DIR}/qquicktextdocument_wrapper.cpp
${QtQuick_GEN_DIR}/qquickview_wrapper.cpp
${QtQuick_GEN_DIR}/qquickwindow_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickwindow_graphicsstateinfo_wrapper.cpp
${QtQuick_GEN_DIR}/qsgbasicgeometrynode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgclipnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgdynamictexture_wrapper.cpp
@@ -33,21 +49,25 @@ ${QtQuick_GEN_DIR}/qsggeometry_point2d_wrapper.cpp
${QtQuick_GEN_DIR}/qsggeometry_texturedpoint2d_wrapper.cpp
${QtQuick_GEN_DIR}/qsggeometry_wrapper.cpp
${QtQuick_GEN_DIR}/qsggeometrynode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgimagenode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgmaterial_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgmaterialshader_renderstate_wrapper.cpp
${QtQuick_GEN_DIR}/qsgmaterialshader_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgmaterialshader_graphicspipelinestate_wrapper.cpp
${QtQuick_GEN_DIR}/qsgmaterialtype_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgninepatchnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgnode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgnodevisitor_wrapper.cpp
${QtQuick_GEN_DIR}/qsgopacitynode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgopaquetexturematerial_wrapper.cpp
#${QtQuick_GEN_DIR}/qsgsimplematerial_wrapper.cpp
#${QtQuick_GEN_DIR}/qsgsimplematerialshader_wrapper.cpp
${QtQuick_GEN_DIR}/qsgrectanglenode_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgrendernode_renderstate_wrapper.cpp
${QtQuick_GEN_DIR}/qsgrendernode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgrootnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgsimplerectnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgsimpletexturenode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgrendererinterface_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgtextnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgtexture_wrapper.cpp
${QtQuick_GEN_DIR}/qsgtexturematerial_wrapper.cpp
${QtQuick_GEN_DIR}/qsgtextureprovider_wrapper.cpp
@@ -62,28 +82,32 @@ set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
${QtCore_GEN_DIR}
${QtNetwork_GEN_DIR}
${QtQml_GEN_DIR}
${QtQuick_GEN_DIR})
set(QtQuick_libraries pyside6 pyside6qml
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES})
-set(QtQuick_deps QtGui QtOpenGL QtNetwork QtQml)
+set(QtQuick_deps QtGui QtNetwork QtQml)
+
+check_qt_opengl("Quick" QtQuick_include_dirs QtQuick_deps
+ QtQuick_DROPPED_ENTRIES)
+
+if (Qt${QT_MAJOR_VERSION}OpenGL_FOUND)
+ list(APPEND QtQuick_SRC
+ ${QtQuick_GEN_DIR}/qquickframebufferobject_wrapper.cpp
+ ${QtQuick_GEN_DIR}/qquickframebufferobject_renderer_wrapper.cpp)
+else()
+ list(APPEND QtQuick_DROPPED_ENTRIES QQuickFramebufferObject)
+endif()
create_pyside_module(NAME QtQuick
INCLUDE_DIRS QtQuick_include_dirs
@@ -91,4 +115,5 @@ create_pyside_module(NAME QtQuick
DEPS QtQuick_deps
TYPESYSTEM_PATH QtQuick_SOURCE_DIR
SOURCES QtQuick_SRC
- STATIC_SOURCES QtQuick_registerType)
+ STATIC_SOURCES QtQuick_registerType
+ DROPPED_ENTRIES QtQuick_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
index f15e1f3d5..f7749b4e7 100644
--- a/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
+++ b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
@@ -9,7 +9,10 @@
#include <shiboken.h>
#include <QtQuick/QQuickPaintedItem>
-#include <QtQuick/QQuickFramebufferObject>
+
+#if QT_CONFIG(opengl) || QT_CONFIG(opengles2) || QT_CONFIG(opengles3)
+# include <QtQuick/QQuickFramebufferObject>
+#endif
bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, const char *classPtrName)
{
@@ -22,7 +25,7 @@ bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, const char *classPtr
template <class WrappedClass>
bool registerTypeIfInheritsFromClass(const char *classPtrName,
PyTypeObject *typeToRegister,
- QQmlPrivate::RegisterType *type)
+ QQmlPrivate::RegisterTypeAndRevisions *type)
{
if (!pyTypeObjectInheritsFromClass(typeToRegister, classPtrName))
return false;
@@ -35,7 +38,7 @@ bool registerTypeIfInheritsFromClass(const char *classPtrName,
return true;
}
-bool quickRegisterType(PyObject *pyObj, QQmlPrivate::RegisterType *type)
+bool quickRegisterType(PyObject *pyObj, QQmlPrivate::RegisterTypeAndRevisions *type)
{
using namespace Shiboken;
@@ -51,8 +54,10 @@ bool quickRegisterType(PyObject *pyObj, QQmlPrivate::RegisterType *type)
return registerTypeIfInheritsFromClass<QQuickPaintedItem>("QQuickPaintedItem*",
pyObjType, type)
+#if QT_CONFIG(opengl) || QT_CONFIG(opengles2) || QT_CONFIG(opengles3)
|| registerTypeIfInheritsFromClass<QQuickFramebufferObject>("QQuickFramebufferObject*",
pyObjType, type)
+#endif
|| registerTypeIfInheritsFromClass<QQuickItem>("QQuickItem*",
pyObjType, type);
}
@@ -62,7 +67,9 @@ void PySide::initQuickSupport(PyObject *module)
Q_UNUSED(module);
// We need to manually register a pointer version of these types in order for them to be used as property types.
qRegisterMetaType<QQuickPaintedItem*>("QQuickPaintedItem*");
+#if QT_CONFIG(opengl) || QT_CONFIG(opengles2) || QT_CONFIG(opengles3)
qRegisterMetaType<QQuickFramebufferObject*>("QQuickFramebufferObject*");
+#endif
qRegisterMetaType<QQuickItem*>("QQuickItem*");
Qml::setQuickRegisterItemFunction(quickRegisterType);
diff --git a/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml
index f4cadad7c..0a24123f4 100644
--- a/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml
+++ b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml
@@ -3,11 +3,15 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtQuick">
+<typesystem package="PySide6.QtQuick"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<!-- QQuickFramebufferObject::Renderer needs QOpenGLFramebufferObject -->
+ <?if !no_QtOpenGL?>
<load-typesystem name="QtOpenGL/typesystem_opengl.xml" generate="no"/>
+ <?endif?>
<load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
<smart-pointer-type name="QSharedPointer" type="shared" getter="data"
@@ -19,7 +23,7 @@
<inject-code class="target" position="end" file="../glue/qtquick.cpp" snippet="qtquick"/>
- <object-type name="QQuickAsyncImageProvider" since="5.6">
+ <object-type name="QQuickAsyncImageProvider">
<modify-function signature="requestImageResponse(const QString&amp;,const QSize&amp;)">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
@@ -46,7 +50,7 @@
<object-type name="QQuickTextureFactory"/>
<object-type name="QQuickImageProvider"/>
- <object-type name="QQuickImageResponse" since="5.6"/>
+ <object-type name="QQuickImageResponse"/>
<object-type name="QQuickTransform"/>
<object-type name="QQuickItem" delete-in-main-thread="true">
@@ -58,16 +62,28 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QTransform]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
+ <modify-function signature="updatePaintNode(QSGNode*,QQuickItem::UpdatePaintNodeData*)">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
<!-- TODO: Find a way to wrap `union ItemChangeData {}` -->
</object-type>
+ <object-type name="QQuickRhiItemRenderer" since="6.7"/>
+ <object-type name="QQuickRhiItem" since="6.7">
+ <enum-type name="TextureFormat"/>
+ </object-type>
+
<object-type name="QQuickItemGrabResult"/>
<object-type name="QQuickPaintedItem">
@@ -82,7 +98,9 @@
<modify-function signature="^fromVulkanImage\(.*$" remove="all"/>
</value-type>
- <object-type name="QQuickTextDocument"/>
+ <object-type name="QQuickTextDocument">
+ <enum-type name="Status" since="6.7"/>
+ </object-type>
<object-type name="QQuickView">
<enum-type name="ResizeMode"/>
@@ -93,25 +111,66 @@
<enum-type name="CreateTextureOption" flags="CreateTextureOptions"/>
<enum-type name="RenderStage"/>
<enum-type name="SceneGraphError"/>
- <enum-type name="TextRenderType" since="5.10"/>
+ <enum-type name="TextRenderType"/>
+ <value-type name="GraphicsStateInfo"/>
+ </object-type>
+
+ <object-type name="QSGBasicGeometryNode">
+ <modify-function signature="setGeometry(QSGGeometry*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
</object-type>
- <object-type name="QSGBasicGeometryNode"/>
<object-type name="QSGClipNode"/>
<object-type name="QSGDynamicTexture"/>
<object-type name="QSGFlatColorMaterial"/>
<object-type name="QSGGeometry">
+ <extra-includes>
+ <include file-name="algorithm" location="global"/>
+ </extra-includes>
<enum-type name="DataPattern"/>
- <enum-type name="AttributeType" since="5.8"/>
- <enum-type name="DrawingMode" since="5.8"/>
- <enum-type name="Type" since="5.8"/>
+ <enum-type name="AttributeType"/>
+ <enum-type name="DrawingMode" python-type="IntEnum"/>
+ <enum-type name="Type"/>
<value-type name="Attribute"/>
<value-type name="AttributeSet"/>
<value-type name="ColoredPoint2D"/>
<value-type name="Point2D"/>
<value-type name="TexturedPoint2D"/>
+ <modify-function signature="vertexDataAsPoint2D()">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject*"/>
+ </modify-argument>
+ <inject-code class="target" file="../glue/qtquick.cpp" snippet="qsgeometry-vertexdataaspoint2d"/>
+ </modify-function>
+ <add-function signature="setVertexDataAsPoint2D(const QList&lt;QSGGeometry::Point2D&gt;&amp;@points@)">
+ <inject-code class="target" file="../glue/qtquick.cpp" snippet="qsgeometry-setvertexdataaspoint2d"/>
+ <inject-documentation format="target" mode="append">
+ Sets the vertex data from a list of QSGGeometry.Point2D.
+ The list size must match the allocated number of vertexes
+ as returned by QSGGeometry.vertexCount().
+ </inject-documentation>
+ </add-function>
+
+ </object-type>
+ <object-type name="QSGGeometryNode">
+ <modify-function signature="setMaterial(QSGMaterial*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setOpaqueMaterial(QSGMaterial*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QSGImageNode">
+ <enum-type name="TextureCoordinatesTransformFlag" flags="TextureCoordinatesTransformMode"/>
</object-type>
- <object-type name="QSGGeometryNode"/>
<object-type name="QSGMaterial">
<enum-type name="Flag" flags="Flags"/>
@@ -122,20 +181,35 @@
<value-type name="RenderState">
<enum-type name="DirtyState" flags="DirtyStates"/>
</value-type>
+ <value-type name="GraphicsPipelineState">
+ <enum-type name="BlendFactor"/>
+ <enum-type name="ColorMaskComponent" flags="ColorMask"/>
+ <enum-type name="CullMode"/>
+ <enum-type name="PolygonMode"/>
+ </value-type>
<modify-function signature="updateSampledImage(QSGMaterialShader::RenderState&amp;,int,QSGTexture**,QSGMaterial*,QSGMaterial*)" remove="all"/>
+ <!-- Private QRhi class -->
+ <modify-function signature="setShader(QSGMaterialShader::Stage,QShader)" remove="all"/>
</object-type>
<object-type name="QSGMaterialType"/>
+ <object-type name="QSGNinePatchNode"/>
<object-type name="QSGNode">
<enum-type name="DirtyStateBit" flags="DirtyState"/>
<enum-type name="Flag" flags="Flags"/>
<enum-type name="NodeType"/>
</object-type>
+ <object-type name="QSGNodeVisitor"/>
+
<object-type name="QSGOpacityNode"/>
<object-type name="QSGOpaqueTextureMaterial"/>
<object-type name="QSGSimpleRectNode"/>
<object-type name="QSGSimpleTextureNode">
<enum-type name="TextureCoordinatesTransformFlag" flags="TextureCoordinatesTransformMode"/>
</object-type>
+ <object-type name="QSGTextNode" since="6.7">
+ <enum-type name="TextStyle"/>
+ <enum-type name="RenderType"/>
+ </object-type>
<object-type name="QSGRectangleNode"/>
<object-type name="QSGRendererInterface">
<enum-type name="GraphicsApi"/>
@@ -150,8 +224,9 @@
<enum-type name="RenderingFlag" flags="RenderingFlags"/>
<object-type name="RenderState"/>
</object-type>
+ <object-type name="QSGRootNode"/>
<object-type name="QSGTexture">
- <enum-type name="AnisotropyLevel" since="5.9"/>
+ <enum-type name="AnisotropyLevel"/>
<enum-type name="Filtering"/>
<enum-type name="WrapMode"/>
</object-type>
diff --git a/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt b/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt
index ecc12a26a..37f8ebfb1 100644
--- a/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtQuick3D/CMakeLists.txt
@@ -1,12 +1,19 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtQuick3D)
+set (QtQuick3D_DROPPED_ENTRIES)
+
set(QtQuick3D_SRC
${QtQuick3D_GEN_DIR}/qquick3d_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dobject_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dgeometry_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dgeometry_attribute_wrapper.cpp
+${QtQuick3D_GEN_DIR}/qquick3dgeometry_targetattribute_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dinstancing_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dinstancing_instancetableentry_wrapper.cpp
+${QtQuick3D_GEN_DIR}/qquick3drenderextension_wrapper.cpp
${QtQuick3D_GEN_DIR}/qquick3dtexturedata_wrapper.cpp
# module is always needed
${QtQuick3D_GEN_DIR}/qtquick3d_module_wrapper.cpp
@@ -17,7 +24,6 @@ set(QtQuick3D_include_dirs ${QtQuick3D_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS}
@@ -25,7 +31,6 @@ set(QtQuick3D_include_dirs ${QtQuick3D_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Quick3D_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
${QtCore_GEN_DIR}
${QtNetwork_GEN_DIR}
${QtQml_GEN_DIR}
@@ -33,19 +38,17 @@ set(QtQuick3D_include_dirs ${QtQuick3D_SOURCE_DIR}
${QtQuick3D_GEN_DIR})
set(QtQuick3D_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Quick3D_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}Quick3D_LIBRARIES})
+
+set(QtQuick3D_deps QtGui QtNetwork QtQml QtQuick)
-set(QtQuick3D_deps QtGui QtOpenGL QtNetwork QtQml QtQuick)
+check_qt_opengl("Quick3D" QtQuick3D_include_dirs QtQuick3D_deps
+ QtQuick3D_DROPPED_ENTRIES)
create_pyside_module(NAME QtQuick3D
INCLUDE_DIRS QtQuick3D_include_dirs
LIBRARIES QtQuick3D_libraries
DEPS QtQuick3D_deps
TYPESYSTEM_PATH QtQuick3D_SOURCE_DIR
- SOURCES QtQuick3D_SRC)
+ SOURCES QtQuick3D_SRC
+ DROPPED_ENTRIES QtQuick3D_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml b/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml
index d2a145df7..fe8f4e700 100644
--- a/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml
+++ b/sources/pyside6/PySide6/QtQuick3D/typesystem_quick3d.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtQuick3D">
+<typesystem package="PySide6.QtQuick3D"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
<object-type name="QQuick3D"/>
@@ -16,6 +17,7 @@
<enum-type name="Semantic"/>
<enum-type name="ComponentType"/>
</value-type>
+ <value-type name="TargetAttribute" since="6.6"/>
<enum-type name="PrimitiveType"/>
</object-type>
<object-type name="QQuick3DInstancing">
@@ -24,4 +26,5 @@
<object-type name="QQuick3DTextureData">
<enum-type name="Format"/>
</object-type>
+ <object-type name="QQuick3DRenderExtension" since="6.7"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt b/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt
index d5f35050d..9951d2e1e 100644
--- a/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt
@@ -1,7 +1,13 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtQuickControls2)
+set (QtQuickControls2_DROPPED_ENTRIES)
+
set(QtQuickControls2_SRC
${QtQuickControls2_GEN_DIR}/qquickstyle_wrapper.cpp
+${QtQuickControls2_GEN_DIR}/qquickattachedpropertypropagator_wrapper.cpp
# module is always needed
${QtQuickControls2_GEN_DIR}/qtquickcontrols2_module_wrapper.cpp
)
@@ -11,14 +17,12 @@ set(QtQuickControls2_include_dirs ${QtQuickControls2_SOURCE_DIR}
${QtQml_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}QuickControls2_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
${QtCore_GEN_DIR}
${QtNetwork_GEN_DIR}
${QtQml_GEN_DIR}
@@ -26,19 +30,17 @@ set(QtQuickControls2_include_dirs ${QtQuickControls2_SOURCE_DIR}
${QtQuickControls2_GEN_DIR})
set(QtQuickControls2_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}QuickControls2_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}QuickControls2_LIBRARIES})
+
+set(QtQuickControls2_deps QtGui QtNetwork QtQml QtQuick)
-set(QtQuickControls2_deps QtGui QtOpenGL QtNetwork QtQml QtQuick)
+check_qt_opengl("QuickControls2" QtQuickControls2_include_dirs QtQuickControls2_deps
+ QtQuickControls2_DROPPED_ENTRIES)
create_pyside_module(NAME QtQuickControls2
INCLUDE_DIRS QtQuickControls2_include_dirs
LIBRARIES QtQuickControls2_libraries
DEPS QtQuickControls2_deps
TYPESYSTEM_PATH QtQuickControls2_SOURCE_DIR
- SOURCES QtQuickControls2_SRC)
+ SOURCES QtQuickControls2_SRC
+ DROPPED_ENTRIES QtQuickControls2_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml b/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml
index 81909616f..72fc05226 100644
--- a/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml
+++ b/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml
@@ -3,9 +3,11 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtQuickControls2">
+<typesystem package="PySide6.QtQuickControls2"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
- <object-type name="QQuickStyle" since="5.7"/>
+ <object-type name="QQuickStyle"/>
+ <object-type name="QQuickAttachedPropertyPropagator"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuickTest/CMakeLists.txt b/sources/pyside6/PySide6/QtQuickTest/CMakeLists.txt
new file mode 100644
index 000000000..8e3fb4d57
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickTest/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+project(QtQuickTest)
+
+set (QtQuickTest_DROPPED_ENTRIES)
+
+set(QtQuickTest_SRC
+# module is always needed
+${QtQuickTest_GEN_DIR}/qtquicktest_module_wrapper.cpp
+)
+
+set(QtQuickTest_include_dirs ${QtQuickTest_SOURCE_DIR}
+ ${QtQml_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtOpenGL_GEN_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuick_GEN_DIR}
+ ${QtQuickTest_GEN_DIR})
+
+set(QtQuickTest_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}QuickTest_LIBRARIES})
+
+set(QtQuickTest_deps QtGui QtNetwork QtQml QtQuick)
+
+check_qt_opengl("QuickTest" QtQuickTest_include_dirs QtQuickTest_deps
+ QtQuickTest_DROPPED_ENTRIES)
+
+create_pyside_module(NAME QtQuickTest
+ INCLUDE_DIRS QtQuickTest_include_dirs
+ LIBRARIES QtQuickTest_libraries
+ DEPS QtQuickTest_deps
+ TYPESYSTEM_PATH QtQuickTest_SOURCE_DIR
+ SOURCES QtQuickTest_SRC
+ DROPPED_ENTRIES QtQuickTest_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtQuickTest/typesystem_quicktest.xml b/sources/pyside6/PySide6/QtQuickTest/typesystem_quicktest.xml
new file mode 100644
index 000000000..b6ef754e7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickTest/typesystem_quicktest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtQuickTest"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <extra-includes>
+ <include file-name="QtQuickTest/quicktest.h" location="global"/>
+ <include file-name="QtCore/QDir" location="global"/>
+ <include file-name="pysideqobject.h" location="global"/>
+ <include file-name="vector" location="global"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning"
+ file="../glue/qtquicktest.cpp" snippet="call-quick-test-main"/>
+
+ <add-function signature="QUICK_TEST_MAIN(QString@name@,QStringList@argv@={},QString@dir@={})"
+ return-type="int">
+ <inject-code file="../glue/qtquicktest.cpp" snippet="quick-test-main"/>
+ <inject-documentation format="target" mode="append"
+ file="../doc/qtquicktest.rst"
+ snippet="quick_test_main_documentation"/>
+ </add-function>
+ <add-function signature="QUICK_TEST_MAIN_WITH_SETUP(QString@name@,PyTypeObject*@setup@,QStringList@argv@={},QString@dir@={})"
+ return-type="int">
+ <inject-code file="../glue/qtquicktest.cpp" snippet="quick-test-main_with_setup"/>
+ <inject-documentation format="target" mode="append"
+ file="../doc/qtquicktest.rst"
+ snippet="quick_test_main_with_setup_documentation"/>
+ </add-function>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt
index 0c6f18bad..883010bee 100644
--- a/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt
@@ -1,5 +1,10 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtQuickWidgets)
+set (QtQuickWidgets_DROPPED_ENTRIES)
+
set(QtQuickWidgets_SRC
${QtQuickWidgets_GEN_DIR}/qquickwidget_wrapper.cpp
# module is always needed
@@ -27,20 +32,17 @@ set(QtQuickWidgets_include_dirs ${QtQuickWidgets_SOURCE_DIR}
${QtQuickWidgets_GEN_DIR})
set(QtQuickWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
${Qt${QT_MAJOR_VERSION}QuickWidgets_LIBRARIES})
-set(QtQuickWidgets_deps QtGui QtOpenGL QtQml QtQuick QtWidgets QtNetwork)
+set(QtQuickWidgets_deps QtGui QtQml QtQuick QtWidgets QtNetwork)
+
+check_qt_opengl("QuickWidgets" QtQuickWidgets_include_dirs QtQuickWidgets_deps
+ QtQuickWidgets_DROPPED_ENTRIES)
create_pyside_module(NAME QtQuickWidgets
INCLUDE_DIRS QtQuickWidgets_include_dirs
LIBRARIES QtQuickWidgets_libraries
DEPS QtQuickWidgets_deps
TYPESYSTEM_PATH QtQuickWidgets_SOURCE_DIR
- SOURCES QtQuickWidgets_SRC)
+ SOURCES QtQuickWidgets_SRC
+ DROPPED_ENTRIES QtQuickWidgets_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml b/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml
index 2768e73d8..4f4484cb0 100644
--- a/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml
+++ b/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtQuickWidgets">
+<typesystem package="PySide6.QtQuickWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
diff --git a/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt b/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt
index 33e21a64c..07835b2f6 100644
--- a/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt
@@ -1,7 +1,11 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtRemoteObjects)
set(QtRemoteObjects_SRC
${QtRemoteObjects_GEN_DIR}/qabstractitemmodelreplica_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qconnectionabstractserver_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectabstractpersistedstore_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectdynamicreplica_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjecthost_wrapper.cpp
@@ -12,9 +16,14 @@ ${QtRemoteObjects_GEN_DIR}/qremoteobjectpendingcallwatcher_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectregistry_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectregistryhost_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectreplica_wrapper.cpp
-# ${QtRemoteObjects_GEN_DIR}/qtremoteobjects_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtremoteobjects_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectsettingsstore_wrapper.cpp
${QtRemoteObjects_GEN_DIR}/qremoteobjectsourcelocationinfo_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtroclientfactory_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtroclientiodevice_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtroiodevicebase_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtroserverfactory_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qtroserveriodevice_wrapper.cpp
# module is always needed
${QtRemoteObjects_GEN_DIR}/qtremoteobjects_module_wrapper.cpp
@@ -26,11 +35,10 @@ set(QtRemoteObjects_include_dirs ${QtRemoteObjects_SOURCE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${libpyside_SOURCE_DIR}
${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${QtCore_GEN_DIR})
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR})
set(QtRemoteObjects_libraries pyside6
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
${Qt${QT_MAJOR_VERSION}RemoteObjects_LIBRARIES})
set(QtRemoteObjects_deps QtCore QtNetwork)
diff --git a/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml b/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml
index db8ab3a1f..86e4d9093 100644
--- a/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml
+++ b/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml
@@ -3,18 +3,21 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtRemoteObjects">
+<typesystem package="PySide6.QtRemoteObjects"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="templates/core_common.xml" generate="no"/>
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+
+ <rejection class="QRemoteObjectStringLiterals"/>
<rejection class="*" function-name="getTypeNameAndMetaobjectFromClassInfo"/>
-<!-- Exclude namespace due to Q_NAMESPACE link errors on Windows (QTBUG-68014)
<rejection class="QtRemoteObjects" field-name="staticMetaObject"/>
<namespace-type name="QtRemoteObjects">
<enum-type name="InitialAction"/>
<enum-type name="QRemoteObjectPacketTypeEnum"/>
</namespace-type>
--->
<object-type name="QAbstractItemModelReplica"/>
+ <object-type name="QConnectionAbstractServer"/>
<object-type name="QRemoteObjectAbstractPersistedStore"/>
<object-type name="QRemoteObjectDynamicReplica"/>
<object-type name="QRemoteObjectHost"/>
@@ -36,9 +39,18 @@
</object-type>
<object-type name="QRemoteObjectSettingsStore"/>
<value-type name="QRemoteObjectSourceLocationInfo"/>
+ <object-type name="QtROClientFactory"/>
+ <object-type name="QtROClientIoDevice"/>
+ <object-type name="QtROIoDeviceBase"/>
+ <object-type name="QtROServerFactory"/>
+ <object-type name="QtROServerIoDevice"/>
<suppress-warning text="^.*Typedef used on signal QRemoteObject.*$"/>
<suppress-warning text="^QRemoteObjectPendingCallWatcher inherits from a non polymorphic type.*$"/>
- <suppress-warning text="Enum 'QRemoteObjectReplica::ConstructorType' (class: QRemoteObjectReplica) does not have a type entry"/>
- <suppress-warning text="skipping field 'QRemoteObjectReplica::d_impl' with unmatched type 'QSharedPointer'"/>
+ <suppress-warning text="^Enum 'QRemoteObjectReplica::ConstructorType'.*does not have a type entry.*$"/>
+ <suppress-warning text="Stripping argument #1 of void QRemoteObjectReplica::QRemoteObjectReplica(QRemoteObjectReplica::ConstructorType) due to unmatched type &quot;QRemoteObjectReplica::ConstructorType&quot; with default expression &quot;DefaultConstructor&quot;."/>
+ <suppress-warning text="skipping protected field 'QRemoteObjectReplica::d_impl' with unmatched type 'QSharedPointer'"/>
+ <!-- QtNetwork is pulled in via QtRemoteObjectsDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtScxml/CMakeLists.txt b/sources/pyside6/PySide6/QtScxml/CMakeLists.txt
index 5eaa40a43..1b0eab0ce 100644
--- a/sources/pyside6/PySide6/QtScxml/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtScxml/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtScxml)
set(QtScxml_OPTIONAL_SRC )
diff --git a/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml b/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml
index 87fb4ad08..ba8820570 100644
--- a/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml
+++ b/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml
@@ -3,15 +3,18 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtScxml">
+<typesystem package="PySide6.QtScxml"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<object-type name="QScxmlCompiler">
<object-type name="Loader"/>
</object-type>
- <object-type name="QScxmlCppDataModel" since="5.12"/>
- <object-type name="QScxmlEvent">
+ <object-type name="QScxmlCppDataModel"/>
+ <!-- PYSIDE-2340: Force value conversion for QScxmlStateMachine::connectToEvent()
+ which expects "func(const QScxmlEvent &)" -->
+ <value-type name="QScxmlEvent">
<enum-type name="EventType"/>
- </object-type>
+ </value-type>
<object-type name="QScxmlDynamicScxmlServiceFactory"/>
<object-type name="QScxmlInvokableService"/>
<object-type name="QScxmlInvokableServiceFactory"/>
@@ -24,9 +27,9 @@
</modify-function>
</object-type>
<object-type name="QScxmlTableData"/>
- <object-type name="QScxmlDataModel" since="5.12">
+ <object-type name="QScxmlDataModel">
<!-- Needs to have exports fixed -->
- <interface-type name="ForeachLoopBody" since="5.12"/>
+ <interface-type name="ForeachLoopBody"/>
<modify-function signature="^evaluateTo(String|Bool|Variant)\(.*bool ?\*.*$">
<modify-argument index="2">
<remove-default-expression/>
@@ -45,5 +48,5 @@
<value-type name="InvokeInfo"/>
<value-type name="ParameterInfo"/>
</namespace-type>
- <object-type name="QScxmlNullDataModel" since="5.12"/>
+ <object-type name="QScxmlNullDataModel"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtSensors/CMakeLists.txt b/sources/pyside6/PySide6/QtSensors/CMakeLists.txt
index 5970cbb05..0152d2884 100644
--- a/sources/pyside6/PySide6/QtSensors/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSensors/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSensors)
set(QtSensors_OPTIONAL_SRC )
diff --git a/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml b/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml
index 924262f52..4efd08277 100644
--- a/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml
+++ b/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSensors">
+<typesystem package="PySide6.QtSensors"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<!-- overrides QObject::metaObject() by private method
<object-type name="QSensorGesture"/>
diff --git a/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt b/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt
new file mode 100644
index 000000000..310a8b0f0
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+project(QtSerialBus)
+
+set(QtSerialBus_OPTIONAL_SRC )
+set(QtSerialBus_DROPPED_ENTRIES )
+
+set(QtSerialBus_SRC
+ ${QtSerialBus_GEN_DIR}/qcanbus_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusdevice_filter_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusdevice_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusdeviceinfo_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusfactory_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusframe_timestamp_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanbusframe_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcandbcfileparser_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanframeprocessor_parseresult_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanframeprocessor_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanmessagedescription_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcansignaldescription_multiplexvaluerange_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcansignaldescription_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qcanuniqueiddescription_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusclient_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusdataunit_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusdevice_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusdeviceidentification_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusexceptionresponse_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbuspdu_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusreply_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusrequest_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusresponse_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusrtuserialclient_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusrtuserialserver_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbusserver_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbustcpclient_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbustcpconnectionobserver_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qmodbustcpserver_wrapper.cpp
+ ${QtSerialBus_GEN_DIR}/qtcanbus_wrapper.cpp
+# module is always needed
+ ${QtSerialBus_GEN_DIR}/qtserialbus_module_wrapper.cpp
+)
+
+set(QtSerialBus_include_dirs ${QtSerialBus_SOURCE_DIR}
+ ${QtSerialBus_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}SerialPort_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}SerialBus_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtSerialPort_GEN_DIR})
+
+set(QtSerialBus_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}SerialBus_LIBRARIES})
+
+set(QtSerialBus_deps QtCore QtNetwork QtSerialPort)
+
+create_pyside_module(NAME QtSerialBus
+ INCLUDE_DIRS QtSerialBus_include_dirs
+ LIBRARIES QtSerialBus_libraries
+ DEPS QtSerialBus_deps
+ TYPESYSTEM_PATH QtSerialBus_SOURCE_DIR
+ SOURCES QtSerialBus_SRC
+ DROPPED_ENTRIES QtSerialBus_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml b/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml
new file mode 100644
index 000000000..fdd2b1483
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+
+<typesystem package="PySide6.QtSerialBus"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+ <load-typesystem name="QtSerialPort/typesystem_serialport.xml" generate="no"/>
+
+ <namespace-type name="QtCanBus">
+ <enum-type name="DataSource"/>
+ <enum-type name="DataFormat"/>
+ <enum-type name="MultiplexState"/>
+ <enum-type name="UniqueId"/>
+ </namespace-type>
+
+ <object-type name="QCanBus">
+ <!-- Remove errorMessage argument, return tuple instead. -->
+ <modify-function signature="availableDevices(QString,QString*)const">
+ <modify-argument index="2">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="tuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtserialbus.cpp" snippet="qcanbus-available-devices"/>
+ <inject-documentation format="target" mode="append">
+ The function returns a tuple of (device_list, error_string).
+ </inject-documentation>
+ </modify-function>
+ <modify-function signature="createDevice(QString,QString,QString*)const">
+ <modify-argument index="3">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return"> <!-- Suppress return value heuristics -->
+ <define-ownership class="target" owner="default"/>
+ <replace-type modified-type="tuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtserialbus.cpp" snippet="qcanbus-createdevice"/>
+ <inject-documentation format="target" mode="append">
+ The function returns a tuple of (device, error_string).
+ </inject-documentation>
+ </modify-function>
+ </object-type>
+ <object-type name="QCanBusDevice">
+ <enum-type name="CanBusError"/>
+ <enum-type name="CanBusDeviceState"/>
+ <enum-type name="CanBusStatus"/>
+ <enum-type name="ConfigurationKey"/>
+ <enum-type name="Direction" flags="Directions"/>
+ <modify-function signature="deviceInfo()const" access="final"/>
+ <value-type name="Filter">
+ <enum-type name="FormatFilter" flags="FormatFilters"/>
+ </value-type>
+ </object-type>
+ <value-type name="QCanBusDeviceInfo"> <!-- deleted default constructor -->
+ <modify-function signature="swap(QCanBusDeviceInfo&amp;)" remove="all"/>
+ </value-type>
+ <object-type name="QCanBusFactory"/>
+ <value-type name="QCanBusFrame">
+ <enum-type name="FrameType"/>
+ <enum-type name="FrameError" flags="FrameErrors"/>
+ <value-type name="TimeStamp"/>
+ </value-type>
+ <object-type name="QCanDbcFileParser">
+ <enum-type name="Error"/>
+ </object-type>
+ <object-type name="QCanFrameProcessor">
+ <enum-type name="Error"/>
+ <value-type name="ParseResult"/>
+ </object-type>
+ <value-type name="QCanMessageDescription"/>
+ <value-type name="QCanSignalDescription">
+ <value-type name="MultiplexValueRange"/>
+ </value-type>
+ <value-type name="QCanUniqueIdDescription"/>
+ <object-type name="QModbusClient"/>
+ <value-type name="QModbusDataUnit">
+ <enum-type name="RegisterType"/>
+ </value-type>
+ <object-type name="QModbusDevice">
+ <enum-type name="Error"/>
+ <enum-type name="State"/>
+ <enum-type name="ConnectionParameter"/>
+ <enum-type name="IntermediateError"/>
+ </object-type>
+ <value-type name="QModbusDeviceIdentification">
+ <enum-type name="ObjectId"/>
+ <enum-type name="ReadDeviceIdCode"/>
+ <enum-type name="ConformityLevel"/>
+ </value-type>
+ <object-type name="QModbusPdu">
+ <enum-type name="ExceptionCode"/>
+ <enum-type name="FunctionCode"/>
+ <modify-field name="ExceptionByte" remove="true"/> <!-- Link error -->
+ </object-type>
+ <object-type name="QModbusExceptionResponse"/>
+ <object-type name="QModbusResponse"/>
+ <object-type name="QModbusReply">
+ <enum-type name="ReplyType"/>
+ </object-type>
+ <object-type name="QModbusRequest"/>
+ <object-type name="QModbusRtuSerialClient"/>
+ <object-type name="QModbusRtuSerialServer"/>
+ <object-type name="QModbusServer">
+ <enum-type name="Option"/>
+ </object-type>
+ <object-type name="QModbusTcpClient"/>
+ <object-type name="QModbusTcpConnectionObserver"/>
+ <object-type name="QModbusTcpServer"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt b/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt
index c0abdf999..564fc9969 100644
--- a/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSerialPort)
set(QtSerialPort_OPTIONAL_SRC )
diff --git a/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml b/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml
index b49abacc6..0cbd3c7f7 100644
--- a/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml
+++ b/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml
@@ -3,10 +3,11 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSerialPort">
+<typesystem package="PySide6.QtSerialPort"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<object-type name="QSerialPort">
- <enum-type name="BaudRate"/>
+ <enum-type name="BaudRate" python-type="IntEnum"/>
<enum-type name="DataBits"/>
<enum-type name="Direction" flags="Directions"/>
<enum-type name="FlowControl"/>
diff --git a/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt b/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt
index 705df54b4..966c0ffe8 100644
--- a/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSpatialAudio/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSpatialAudio)
set(QtSpatialAudio_SRC
@@ -25,12 +28,8 @@ set(QtSpatialAudio_include_dirs ${QtSpatialAudio_SOURCE_DIR}
${QtMultimedia_GEN_DIR})
set(QtSpatialAudio_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}SpatialAudio_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}SpatialAudio_LIBRARIES})
+
set(QtSpatialAudio_deps QtCore QtGui QtNetwork QtMultimedia)
create_pyside_module(NAME QtSpatialAudio
diff --git a/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml b/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml
index 71f189b25..b9c2557af 100644
--- a/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml
+++ b/sources/pyside6/PySide6/QtSpatialAudio/typesystem_spatialaudio.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSpatialAudio">
+<typesystem package="PySide6.QtSpatialAudio"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
diff --git a/sources/pyside6/PySide6/QtSql/CMakeLists.txt b/sources/pyside6/PySide6/QtSql/CMakeLists.txt
index ec6285926..fedebe642 100644
--- a/sources/pyside6/PySide6/QtSql/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSql/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSql)
set(QtSql_SRC
@@ -32,13 +35,13 @@ set(QtSql_include_dirs ${QtSql_SOURCE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
+ ${QtWidgets_GEN_DIR})
+
+# Link to QtWidgets to enable QSqlRelationalDelegate
set(QtSql_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Sql_LIBRARIES})
+
set(QtSql_deps QtWidgets)
create_pyside_module(NAME QtSql
diff --git a/sources/pyside6/PySide6/QtSql/typesystem_sql.xml b/sources/pyside6/PySide6/QtSql/typesystem_sql.xml
index c7b1d58b0..70c3e6f69 100644
--- a/sources/pyside6/PySide6/QtSql/typesystem_sql.xml
+++ b/sources/pyside6/PySide6/QtSql/typesystem_sql.xml
@@ -3,12 +3,12 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSql">
+<typesystem package="PySide6.QtSql"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<rejection class="QSqlDriverCreator"/>
<rejection class="QSqlDriverPlugin"/>
- <rejection class="QSqlDriverFactoryInterface"/>
<namespace-type name="QSql">
<enum-type name="Location"/>
@@ -123,6 +123,14 @@
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
+ <!-- FIXME: PYSIDE7: Handle setQuery(QSqlQuery&&) in some way?
+ QTBUG-91766/PYSIDE-2394. allow-thread for PYSIDE-1931 -->
+ <modify-function signature="setQuery(QSqlQuery)" allow-thread="yes"
+ deprecated="false"/>
+ <modify-function signature="setQuery(QString,QSqlDatabase)" allow-thread="yes"/>
+ <!-- FIXME: PYSIDE7: Probably needs a fix, make QSqlQuery an object type?
+ QTBUG-105048/PYSIDE-2300 -->
+ <declare-function signature="query()" return-type="QSqlQuery"/>
</object-type>
<object-type name="QSqlRelationalTableModel">
<enum-type name="JoinMode"/>
@@ -130,6 +138,7 @@
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
+ <modify-function signature="select()" allow-thread="yes"/> <!-- PYSIDE-1931 -->
</object-type>
<object-type name="QSqlResult">
<enum-type name="BindingSyntax"/>
@@ -162,6 +171,7 @@
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
+ <modify-function signature="select()" allow-thread="yes"/> <!-- PYSIDE-1931 -->
</object-type>
<object-type name="QSqlDriverCreatorBase">
<extra-includes>
diff --git a/sources/pyside6/PySide6/QtStateMachine/CMakeLists.txt b/sources/pyside6/PySide6/QtStateMachine/CMakeLists.txt
index 204a126b6..2b4cc348d 100644
--- a/sources/pyside6/PySide6/QtStateMachine/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtStateMachine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtStateMachine)
set(QtStateMachine_SRC
@@ -23,13 +26,11 @@ set(QtStateMachine_include_dirs ${QtStateMachine_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- )
+ ${QtGui_GEN_DIR})
+
set(QtStateMachine_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}StateMachine_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}StateMachine_LIBRARIES})
+
set(QtStateMachine_deps QtGui)
create_pyside_module(NAME QtStateMachine
diff --git a/sources/pyside6/PySide6/QtStateMachine/typesystem_statemachine.xml b/sources/pyside6/PySide6/QtStateMachine/typesystem_statemachine.xml
index cc9b3f6c7..0e29f240f 100644
--- a/sources/pyside6/PySide6/QtStateMachine/typesystem_statemachine.xml
+++ b/sources/pyside6/PySide6/QtStateMachine/typesystem_statemachine.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtStateMachine">
+<typesystem package="PySide6.QtStateMachine"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<object-type name="QAbstractState">
@@ -124,10 +125,15 @@ s1.addTransition(button.clicked, s1h)&lt;/code>
</modify-argument>
</modify-function>
+ <modify-function signature="assignProperty(QObject*,const char*,QVariant)">
+ <modify-argument index="2" pyi-type="str"/>
+ </modify-function>
+
<modify-function signature="addTransition(const QObject*,const char*,QAbstractState*)">
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
+ <modify-argument index="2" pyi-type="str"/>
<inject-code class="target" position="beginning" file="../glue/qtstatemachine.cpp"
snippet="qstate-addtransition-1"/>
</modify-function>
diff --git a/sources/pyside6/PySide6/QtSvg/CMakeLists.txt b/sources/pyside6/PySide6/QtSvg/CMakeLists.txt
index 748c8355c..5451380cc 100644
--- a/sources/pyside6/PySide6/QtSvg/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSvg/CMakeLists.txt
@@ -1,8 +1,12 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSvg)
set(QtSvg_SRC
${QtSvg_GEN_DIR}/qsvggenerator_wrapper.cpp
${QtSvg_GEN_DIR}/qsvgrenderer_wrapper.cpp
+${QtSvg_GEN_DIR}/qtsvg_wrapper.cpp
# module is always needed
${QtSvg_GEN_DIR}/qtsvg_module_wrapper.cpp
)
@@ -14,13 +18,12 @@ set(QtSvg_include_dirs ${QtSvg_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Svg_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- )
+ ${QtGui_GEN_DIR})
+
set(QtSvg_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Svg_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}Svg_LIBRARIES})
+
+
set(QtSvg_deps QtGui)
create_pyside_module(NAME QtSvg
diff --git a/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml b/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml
index afc70824f..4803f4d93 100644
--- a/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml
+++ b/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml
@@ -3,12 +3,17 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSvg">
+<typesystem package="PySide6.QtSvg"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<object-type name="QSvgRenderer"/>
+ <namespace-type name="QtSvg" since="6.7">
+ <enum-type name="Option" flags="Options"/>
+ </namespace-type>
<object-type name="QSvgGenerator">
+ <enum-type name="SvgVersion" since="6.5"/>
<modify-function signature="setOutputDevice(QIODevice*)">
<modify-argument index="1">
<reference-count action="set"/>
diff --git a/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt
index 6922f877d..6bd3aedc1 100644
--- a/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtSvgWidgets)
set(QtSvgWidgets_SRC
@@ -18,16 +21,10 @@ set(QtSvgWidgets_include_dirs ${QtSvgWidgets_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
${QtWidgets_GEN_DIR}
- ${QtSvg_GEN_DIR}
- )
+ ${QtSvg_GEN_DIR})
set(QtSvgWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Svg_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}SvgWidgets_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}SvgWidgets_LIBRARIES})
set(QtSvgWidgets_deps QtSvg QtWidgets)
diff --git a/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml b/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml
index ce7a02c68..36bda1ea3 100644
--- a/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml
+++ b/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtSvgWidgets">
+<typesystem package="PySide6.QtSvgWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtSvg/typesystem_svg.xml" generate="no"/>
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
diff --git a/sources/pyside6/PySide6/QtTest/CMakeLists.txt b/sources/pyside6/PySide6/QtTest/CMakeLists.txt
index 0e54461c1..86bb2a731 100644
--- a/sources/pyside6/PySide6/QtTest/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtTest/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtTest)
set(QtTest_SRC
@@ -24,14 +27,15 @@ set(QtTest_include_dirs ${QtTest_SOURCE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
+ ${QtWidgets_GEN_DIR})
+
+# Link to QtGui/QtWidgets to enable gui/widget-specific inline functions
set(QtTest_libraries pyside6
${Qt${QT_MAJOR_VERSION}Test_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES})
+
set(QtTest_deps QtWidgets)
create_pyside_module(NAME QtTest
diff --git a/sources/pyside6/PySide6/QtTest/typesystem_test.xml b/sources/pyside6/PySide6/QtTest/typesystem_test.xml
index c8c814992..2fc4f23cd 100644
--- a/sources/pyside6/PySide6/QtTest/typesystem_test.xml
+++ b/sources/pyside6/PySide6/QtTest/typesystem_test.xml
@@ -3,19 +3,16 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtTest">
+<typesystem package="PySide6.QtTest"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<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"/>
- <rejection class="QTest" function-name="qCompare&lt;char&gt;"/>
- <rejection class="QTest" function-name="qCompare&lt;char*&gt;"/>
- <rejection class="QTest" function-name="qCompare&lt;double&gt;"/>
- <rejection class="QTest" function-name="qCompare&lt;float&gt;"/>
- <rejection class="QTest" function-name="qCompare&lt;double,qreal&gt;"/>
- <rejection class="QTest" function-name="qCompare&lt;qreal,double&gt;"/>
+ <rejection class="QTest::Internal"/>
+ <rejection class="QTestPrivate"/>
+
<rejection class="QTest" function-name="qCompare"/>
- <rejection class="QTest" function-name="qInit"/>
<rejection class="QTest" function-name="qVerify"/>
<rejection class="QTest" function-name="toHexRepresentation"/>
<rejection class="QTest" function-name="qFail"/>
@@ -24,27 +21,11 @@
<rejection class="QTest" function-name="qData"/>
<rejection class="QTest" function-name="qWarn"/>
<rejection class="QTest" function-name="toString"/>
- <rejection class="QTest" function-name="toString&lt;bool>"/>
- <rejection class="QTest" function-name="toString&lt;char>"/>
- <rejection class="QTest" function-name="toString&lt;unsigned char>"/>
- <rejection class="QTest" function-name="toString&lt;signed char>"/>
- <rejection class="QTest" function-name="toString&lt;double>"/>
- <rejection class="QTest" function-name="toString&lt;float>"/>
- <rejection class="QTest" function-name="toString&lt;int>"/>
- <rejection class="QTest" function-name="toString&lt;long>"/>
- <rejection class="QTest" function-name="toString&lt;qint64>"/>
- <rejection class="QTest" function-name="toString&lt;quint64>"/>
- <rejection class="QTest" function-name="toString&lt;short>"/>
- <rejection class="QTest" function-name="toString&lt;uint>"/>
- <rejection class="QTest" function-name="toString&lt;ulong>"/>
- <rejection class="QTest" function-name="toString&lt;ushort>"/>
<rejection class="QTest" function-name="useVerifyThrowsException"/>
- <rejection class="QTest" function-name="qt_snprintf"/>
<rejection class="QTest" function-name="compare_helper"/>
<rejection class="QTest" function-name="toPrettyUnicode"/>
- <rejection class="QTest" field-name="lastMouseButton"/>
<rejection class="QTest" field-name="lastMouseTimestamp"/>
<!-- Qt5: this new stuff below belongs to QtGui. I keep it here for now, after a long odyssey.
@@ -91,11 +72,11 @@
<enum-type name="MouseAction"/>
<enum-type name="QBenchmarkMetric" since="4.7"/>
<enum-type name="TestFailMode"/>
+ <enum-type name="ComparisonOperation" since="6.4"/>
<extra-includes>
<include file-name="QtTest" location="global"/>
</extra-includes>
- <rejection class="QTouchEventSequence"/>
<object-type name="PySideQTouchEventSequence" target-lang-name="QTouchEventSequence" since="4.6" >
<modify-function signature="press(int,const QPoint&amp;,QWidget*)">
<modify-argument index="return">
diff --git a/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt b/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt
index 9b6b5eb0a..9f0bd2fc3 100644
--- a/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtTextToSpeech)
set(QtTextToSpeech_SRC
@@ -16,9 +19,7 @@ set(QtTextToSpeech_include_dirs ${QtTextToSpeech_SOURCE_DIR}
${QtCore_GEN_DIR})
set(QtTextToSpeech_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}TextToSpeech_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES})
+ ${Qt${QT_MAJOR_VERSION}TextToSpeech_LIBRARIES})
set(QtTextToSpeech_deps QtCore QtMultimedia)
diff --git a/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml b/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml
index 4a0b4482a..70751e9d9 100644
--- a/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml
+++ b/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml
@@ -3,13 +3,15 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtTextToSpeech">
+<typesystem package="PySide6.QtTextToSpeech"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<object-type name="QTextToSpeech">
<enum-type name="State"/>
<enum-type name="BoundaryHint"/>
<enum-type name="ErrorReason"/>
+ <enum-type name="Capability" flags="Capabilities" since="6.6"/>
</object-type>
<object-type name="QTextToSpeechEngine"/>
<value-type name="QVoice">
diff --git a/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt b/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt
index df54114d3..e16d2d585 100644
--- a/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtUiTools)
set(QtUiTools_SRC
@@ -22,15 +25,12 @@ set(QtUiTools_include_dirs ${QtUiTools_SOURCE_DIR}
${plugins_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
+ ${QtWidgets_GEN_DIR})
+
set(QtUiTools_libraries pyside6
uiplugin
- ${Qt${QT_MAJOR_VERSION}UiTools_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}UiTools_LIBRARIES})
+
set(QtUiTools_deps QtWidgets)
configure_file("${QtUiTools_SOURCE_DIR}/QtUiTools_global.pre.h.in"
diff --git a/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml b/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml
index a67dd6f61..9cfa176c8 100644
--- a/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml
+++ b/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml
@@ -4,7 +4,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtUiTools">
+<typesystem package="PySide6.QtUiTools"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<object-type name="QUiLoader">
@@ -14,38 +15,10 @@
<inject-code class="native" position="beginning" file="../glue/qtuitools.cpp" snippet="uitools-loadui"/>
<inject-code file="../glue/qtuitools.cpp" snippet="quiloader"/>
<add-function signature="registerCustomWidget(PyObject*@customWidgetType@)" return-type="void">
- <inject-documentation format="target" mode="append">
- Registers a Python created custom widget to QUiLoader, so it can be recognized when
- loading a `.ui` file. The custom widget type is passed via the ``customWidgetType`` argument.
- This is needed when you want to override a virtual method of some widget in the interface,
- since duck punching will not work with widgets created by QUiLoader based on the contents
- of the `.ui` file.
-
- (Remember that `duck punching virtual methods is an invitation for your own demise!
- &lt;https://doc.qt.io/qtforpython/shiboken6/wordsofadvice.html#duck-punching-and-virtual-methods>`_)
-
- Let's see an obvious example. If you want to create a new widget it's probable you'll end up
- overriding :class:`~PySide6.QtGui.QWidget`'s :meth:`~PySide6.QtGui.QWidget.paintEvent` method.
-
- .. code-block:: python
-
- class Circle(QWidget):
- def paintEvent(self, event):
- with QPainter(self) as painter:
- painter.setPen(self.pen)
- painter.setBrush(QBrush(self.color))
- painter.drawEllipse(event.rect().center(), 20, 20)
-
- # ...
-
- loader = QUiLoader()
- loader.registerCustomWidget(Circle)
- circle = loader.load('circle.ui')
- circle.show()
-
- # ...
- </inject-documentation>
- <inject-code class="target" position="beginning" file="../glue/qtuitools.cpp" snippet="quiloader-registercustomwidget"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtuitools.rst"
+ snippet="quiloader-registercustomwidget"/>
+ <inject-code class="target" position="beginning" file="../glue/qtuitools.cpp"
+ snippet="quiloader-registercustomwidget"/>
</add-function>
<modify-function signature="createAction(QObject*,const QString&amp;)">
<modify-argument index="return">
@@ -107,6 +80,8 @@
-->
<add-function signature="loadUiType(const QString&amp; @uifile@)" return-type="PyObject*">
<inject-code file="../glue/qtuitools.cpp" snippet="loaduitype"/>
+ <inject-documentation format="target" mode="append" file="../doc/qtuitools.rst"
+ snippet="loaduitype"/>
</add-function>
diff --git a/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt b/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt
index b6b8d3e5e..4c06edd2f 100644
--- a/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWebChannel)
set(QtWebChannel_SRC
@@ -12,12 +15,11 @@ set(QtWebChannel_include_dirs ${QtWebChannel_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}WebChannel_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtWebChannel_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
+ ${QtCore_GEN_DIR})
+
+set(QtWebChannel_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES})
+
set(QtWebChannel_deps QtCore)
create_pyside_module(NAME QtWebChannel
diff --git a/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml b/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml
index a4c209bfc..c08a9b187 100644
--- a/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml
+++ b/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWebChannel">
+<typesystem package="PySide6.QtWebChannel"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<object-type name="QWebChannel"/>
@@ -16,4 +17,7 @@
the QML module is not yet wrapped.
<object-type name="QQmlWebChannel"/> -->
+ <!-- QtQml/QtNetwork are pulled in via QtQtWebChannelDepends. -->
+ <suppress-warning text="^Scoped enum 'Q(Ocsp)|(Dtls)|(Qml).*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
index 0da2c6c7b..0cdaf2f91 100644
--- a/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
@@ -1,17 +1,29 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWebEngineCore)
set(QtWebEngineCore_SRC
${QtWebEngineCore_GEN_DIR}/qwebenginecertificateerror_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineclientcertificateselection_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineclientcertificatestore_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginecontextmenurequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_filterrequest_wrapper.cpp
+# FIXME ${QtWebEngineCore_GEN_DIR}/qwebenginedesktopmediarequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginedownloadrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginefilesystemaccessrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginefindtextresult_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginefullscreenrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineglobalsettings_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineglobalsettings_dnsmode_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginehistory_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginehistoryitem_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginehistorymodel_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginehttprequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginenavigationrequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineloadinginfo_wrapper.cpp
+# FIXME ${QtWebEngineCore_GEN_DIR}/qwebenginemediasourcemodel_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginenewwindowrequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginenotification_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginepage_wrapper.cpp
@@ -21,12 +33,13 @@ ${QtWebEngineCore_GEN_DIR}/qwebengineregisterprotocolhandlerrequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginescript_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginescriptcollection_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginesettings_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebenginefindtextresult_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinfo_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinterceptor_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestjob_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlscheme_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlschemehandler_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginewebauthpinrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginewebauthuxrequest_wrapper.cpp
# module is always needed
${QtWebEngineCore_GEN_DIR}/qtwebenginecore_module_wrapper.cpp
)
@@ -46,17 +59,10 @@ set(QtWebEngineCore_include_dirs
${QtWidgets_GEN_DIR}
${QtNetwork_GEN_DIR}
${QtPrintSupport_GEN_DIR}
- ${QtWebChannel_GEN_DIR}
- )
+ ${QtWebChannel_GEN_DIR})
+
set(QtWebEngineCore_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES})
set(QtWebEngineCore_deps QtCore QtGui QtNetwork QtPrintSupport QtWebChannel)
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
index ec45cb53f..da9259ccc 100644
--- a/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
+++ b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
@@ -3,14 +3,26 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWebEngineCore">
+<typesystem package="PySide6.QtWebEngineCore"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
<load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
<load-typesystem name="QtWebChannel/typesystem_webchannel.xml" generate="no"/>
+ <rejection class="extensions"/>
+
+ <function signature="qWebEngineChromiumVersion()"/>
+ <function signature="qWebEngineChromiumSecurityPatchVersion()"/>
+ <function signature="qWebEngineVersion()"/>
+
+ <value-type name="QWebEngineClientCertificateSelection"/>
+ <object-type name="QWebEngineClientCertificateStore"/>
+
<object-type name="QWebEngineCookieStore">
+ <inject-code class="native" position="beginning" file="../glue/qtwebenginecore.cpp"
+ snippet="qwebenginecookiestore-functor"/>
<value-type name="FilterRequest" />
<add-function signature="setCookieFilter(PyCallable* @filterCallback@)">
<inject-code class="target" position="beginning" file="../glue/qtwebenginecore.cpp"
@@ -34,6 +46,13 @@
<enum-type name="SavePageFormat"/>
</object-type>
+ <value-type name="QWebEngineFileSystemAccessRequest">
+ <enum-type name="AccessFlag" flags="AccessFlags"/>
+ <enum-type name="HandleType"/>
+ <!-- No default constructor -->
+ <modify-function signature="swap(QWebEngineFileSystemAccessRequest&amp;)" remove="all"/>
+ </value-type>
+
<value-type name="QWebEngineFullScreenRequest"/>
<object-type name="QWebEngineHistory"/>
@@ -45,6 +64,11 @@
<enum-type name="Roles"/>
</object-type>
+ <object-type name="QWebEngineNavigationRequest">
+ <enum-type name="NavigationType"/>
+ <enum-type name="NavigationRequestAction"/>
+ </object-type>
+
<object-type name="QWebEngineNotification"/>
<object-type name="QWebEnginePage">
@@ -58,6 +82,16 @@
<enum-type name="FileSelectionMode"/>
<enum-type name="JavaScriptConsoleMessageLevel"/>
<enum-type name="RenderProcessTerminationStatus"/>
+ <add-function signature="javaScriptPromptPyOverride(QUrl@securityOrigin@,QString@msg@,QString@defaultValue@)"
+ return-type="std::pair&lt;bool,QString&gt;" python-override="true"/>
+ <modify-function signature="javaScriptPrompt(QUrl,QString,QString,QString*)">
+ <inject-code class="shell" position="override" file="../glue/qtwebenginecore.cpp"
+ snippet="qwebenginepage-javascriptprompt-virtual-redirect"/>
+ <modify-argument index="return" pyi-type="Tuple[bool, str]"/>
+ <modify-argument index="4"><remove-default-expression/><remove-argument/></modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginecore.cpp"
+ snippet="qwebenginepage-javascriptprompt-return"/>
+ </modify-function>
<add-function signature="findText(const QString &amp;,QWebEnginePage::FindFlags,PyObject*)">
<inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-findtext"/>
</add-function>
@@ -73,6 +107,11 @@
</object-type>
<object-type name="QWebEngineProfile">
+ <extra-includes>
+ <include file-name="QtWebEngineCore/QWebEngineNotification" location="global"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtwebenginecore.cpp"
+ snippet="qwebengineprofile-functor"/>
<enum-type name="HttpCacheType"/>
<enum-type name="PersistentCookiesPolicy"/>
<add-function signature="setNotificationPresenter(PyCallable* @notificationPresenter@)">
@@ -86,7 +125,7 @@
<value-type name="QWebEngineScript">
<enum-type name="InjectionPoint"/>
- <enum-type name="ScriptWorldId"/>
+ <enum-type name="ScriptWorldId" python-type="IntEnum"/>
</value-type>
<object-type name="QWebEngineScriptCollection"/>
@@ -94,7 +133,7 @@
<object-type name="QWebEngineSettings">
<enum-type name="FontFamily"/>
<enum-type name="FontSize"/>
- <enum-type name="UnknownUrlSchemePolicy" since="5.11"/>
+ <enum-type name="UnknownUrlSchemePolicy"/>
<enum-type name="WebAttribute"/>
</object-type>
@@ -107,7 +146,7 @@
<enum-type name="LoadStatus"/>
</value-type>
- <object-type name="QWebEngineRegisterProtocolHandlerRequest"/>
+ <value-type name="QWebEngineRegisterProtocolHandlerRequest"/>
<value-type name="QWebEngineFindTextResult"/>
@@ -123,7 +162,7 @@
<object-type name="QWebEngineUrlRequestJob">
<enum-type name="Error"/>
</object-type>
- <value-type name="QWebEngineUrlScheme" since="5.12">
+ <value-type name="QWebEngineUrlScheme">
<enum-type name="Syntax"/>
<enum-type name="SpecialPort"/>
<enum-type name="Flag" flags="Flags"/>
@@ -131,4 +170,23 @@
<object-type name="QWebEngineUrlSchemeHandler"/>
+ <!-- FIXME not in snapshot yet
+ <value-type name="QWebEngineDesktopMediaRequest" since="6.7"/>
+ <object-type name="QWebEngineMediaSourceModel" since="6.7"/>
+ -->
+ <value-type name="QWebEngineWebAuthPinRequest" since="6.7"/>
+ <object-type name="QWebEngineWebAuthUxRequest" since="6.7">
+ <enum-type name="WebAuthUxState"/>
+ <enum-type name="PinEntryReason"/>
+ <enum-type name="PinEntryError"/>
+ <enum-type name="RequestFailureReason"/>
+ </object-type>
+ <namespace-type name="QWebEngineGlobalSettings">
+ <enum-type name="SecureDnsMode"/>
+ <value-type name="DnsMode"/>
+ </namespace-type>
+
+ <!-- QtQml is pulled in via QtWebEngineCoreDepends. -->
+ <suppress-warning text="^Scoped enum 'QQml.*' does not have a type entry.*$"/>
+
</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt
index 1f3b7d9af..5aedc1147 100644
--- a/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWebEngineQuick)
set(QtWebEngineQuick_SRC
@@ -16,15 +19,10 @@ set(QtWebEngineQuick_include_dirs
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtNetwork_GEN_DIR}
- ${QtQml_GEN_DIR}
- )
+ ${QtQml_GEN_DIR})
set(QtWebEngineQuick_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebEngineQuick_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}WebEngineQuick_LIBRARIES})
set(QtWebEngineQuick_deps QtQml QtNetwork QtCore)
diff --git a/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml b/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml
index 72a31deb2..108ba5fae 100644
--- a/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml
+++ b/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWebEngineQuick">
+<typesystem package="PySide6.QtWebEngineQuick"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
<namespace-type name="QtWebEngineQuick"/> <!-- initialize() -->
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
index c43be68f1..9da97243c 100644
--- a/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWebEngineWidgets)
set(QtWebEngineWidgets_SRC
@@ -24,17 +27,10 @@ set(QtWebEngineWidgets_include_dirs
${QtNetwork_GEN_DIR}
${QtWebEngineCore_GEN_DIR}
${QtPrintSupport_GEN_DIR}
- ${QtWebChannel_GEN_DIR}
- )
-set(QtWebEngineWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES}
- )
+ ${QtWebChannel_GEN_DIR})
+
+set(QtWebEngineWidgets_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_LIBRARIES})
set(QtWebEngineWidgets_deps QtGui QtWidgets QtNetwork QtPrintSupport QtWebChannel QtWebEngineCore)
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
index fb5e6d379..61874856b 100644
--- a/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWebEngineWidgets">
+<typesystem package="PySide6.QtWebEngineWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<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"/>
diff --git a/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt b/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt
index 657554a5e..5ff07555b 100644
--- a/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt
@@ -1,20 +1,19 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWebSockets)
set(QtWebSockets_SRC
${QtWebSockets_GEN_DIR}/qmaskgenerator_wrapper.cpp
${QtWebSockets_GEN_DIR}/qwebsocket_wrapper.cpp
${QtWebSockets_GEN_DIR}/qwebsocketcorsauthenticator_wrapper.cpp
+${QtWebSockets_GEN_DIR}/qwebsockethandshakeoptions_wrapper.cpp
${QtWebSockets_GEN_DIR}/qwebsocketprotocol_wrapper.cpp
${QtWebSockets_GEN_DIR}/qwebsocketserver_wrapper.cpp
# module is always needed
${QtWebSockets_GEN_DIR}/qtwebsockets_module_wrapper.cpp
)
-if (Qt${QT_MAJOR_VERSION}WebSockets_VERSION VERSION_GREATER_EQUAL 6.4.0)
- list(APPEND QtWebSockets_SRC
- ${QtWebSockets_GEN_DIR}/qwebsockethandshakeoptions_wrapper.cpp)
-endif()
-
set(QtWebSockets_include_dirs ${QtWebSockets_SOURCE_DIR}
${QtWebSockets_BINARY_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
@@ -23,13 +22,10 @@ set(QtWebSockets_include_dirs ${QtWebSockets_SOURCE_DIR}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
${QtWebSockets_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- )
-set(QtWebSockets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}WebSockets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
+ ${QtNetwork_GEN_DIR})
+
+set(QtWebSockets_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebSockets_LIBRARIES})
set(QtWebSockets_deps QtNetwork)
diff --git a/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml b/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml
index 914c8ce81..2d8d95898 100644
--- a/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml
+++ b/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWebSockets">
+<typesystem package="PySide6.QtWebSockets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
diff --git a/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt
index 3f960bcff..1a77181f2 100644
--- a/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtWidgets)
set(QtWidgets_SRC
@@ -37,6 +40,7 @@ ${QtWidgets_GEN_DIR}/qfocusframe_wrapper.cpp
${QtWidgets_GEN_DIR}/qfontcombobox_wrapper.cpp
${QtWidgets_GEN_DIR}/qfontdialog_wrapper.cpp
${QtWidgets_GEN_DIR}/qformlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qformlayout_takerowresult_wrapper.cpp
${QtWidgets_GEN_DIR}/qframe_wrapper.cpp
${QtWidgets_GEN_DIR}/qgesture_wrapper.cpp
${QtWidgets_GEN_DIR}/qgestureevent_wrapper.cpp
@@ -112,6 +116,7 @@ ${QtWidgets_GEN_DIR}/qprogressdialog_wrapper.cpp
${QtWidgets_GEN_DIR}/qproxystyle_wrapper.cpp
${QtWidgets_GEN_DIR}/qpushbutton_wrapper.cpp
${QtWidgets_GEN_DIR}/qradiobutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qrhiwidget_wrapper.cpp
${QtWidgets_GEN_DIR}/qrubberband_wrapper.cpp
${QtWidgets_GEN_DIR}/qscrollarea_wrapper.cpp
${QtWidgets_GEN_DIR}/qscrollbar_wrapper.cpp
@@ -205,13 +210,11 @@ set(QtWidgets_include_dirs ${QtWidgets_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- )
+ ${QtGui_GEN_DIR})
+
set(QtWidgets_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- )
+ ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
+
set(QtWidgets_deps QtGui)
create_pyside_module(NAME QtWidgets
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml
index fabd87d22..93a7151fc 100644
--- a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWidgets">
+<typesystem package="PySide6.QtWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtWidgets/typesystem_widgets_common.xml" generate="yes"/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml
index fe8aced95..0669c18f6 100644
--- a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml
@@ -3,7 +3,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtWidgets">
+<typesystem package="PySide6.QtWidgets"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="templates/core_common.xml" generate="no"/>
<load-typesystem name="templates/widgets_common.xml" generate="no"/>
@@ -29,16 +30,8 @@
enum 'QGraphicsPolygonItem::Type' does not have a type entry or is not an enum
"""
-->
- <rejection class="*" enum-name="enum_1"/>
-
<rejection class="QMdi"/>
- <!--
- Event classes have a lot of non-documented protected fields, those fields
- are removed from PySide because they are Qt implementation details,
- besides the fact they are accessible by ordinary event methods.
- -->
-
<function signature="qDrawShadeLine(QPainter*,int,int,int,int,const QPalette&amp;,bool,int,int)"/>
<function signature="qDrawShadeLine(QPainter*,const QPoint,const QPoint,const QPalette&amp;,bool,int,int)"/>
<function signature="qDrawShadeRect(QPainter*,int,int,int,int,const QPalette&amp;,bool,int,int,const QBrush*)"/>
@@ -51,8 +44,10 @@
<function signature="qDrawWinPanel(QPainter*,const QRect&amp;,const QPalette&amp;,bool,const QBrush*)"/>
<function signature="qDrawPlainRect(QPainter*,int,int,int,int,const QColor&amp;,int,const QBrush*)"/>
<function signature="qDrawPlainRect(QPainter*,const QRect&amp;,const QColor&amp;,int,const QBrush*)"/>
+ <function signature="qDrawPlainRoundedRect(QPainter*,int,int,int,int,qreal,qreal,const QColor&amp;,int,const QBrush*)" since="6.7"/>
+ <function signature="qDrawPlainRoundedRect(QPainter*,const QRect&amp;,qreal,qreal,const QColor&amp;,int,const QBrush *)" since="6.7"/>
- <object-type name="QStyleOption" polymorphic-id-expression="%1-&gt;type == QStyleOption::SO_Default"
+ <object-type name="QStyleOption" polymorphic-id-expression="%B-&gt;type == QStyleOption::SO_Default"
polymorphic-name-function="styleOptionType">
<inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp"
snippet="qstyleoption-typename"/>
@@ -60,45 +55,54 @@
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionGraphicsItem" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionGraphicsItem *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionGraphicsItem"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionGraphicsItem *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionSizeGrip" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSizeGrip *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionSizeGrip"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSizeGrip *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionButton" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionButton *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionButton"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionButton *&gt;(%B) != nullptr">
<enum-type name="ButtonFeature" flags="ButtonFeatures"/>
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionComboBox" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionComboBox *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionComboBox"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionComboBox *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionComplex" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionComplex *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionComplex"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionComplex *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionDockWidget" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionDockWidget *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionDockWidget"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionDockWidget *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionFocusRect" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionFocusRect *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionFocusRect" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionFocusRect *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionFrame" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionFrame *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionFrame"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionFrame *&gt;(%B) != nullptr">
<enum-type name="FrameFeature" flags="FrameFeatures"/>
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionGroupBox" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionGroupBox *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionGroupBox"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionGroupBox *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionHeader" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionHeader *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionHeader"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionHeader *&gt;(%B) != nullptr">
<enum-type name="SectionPosition"/>
<enum-type name="SelectedPosition"/>
<enum-type name="SortIndicator"/>
@@ -109,29 +113,35 @@
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionMenuItem" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionMenuItem *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionMenuItem"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionMenuItem *&gt;(%B) != nullptr">
<enum-type name="CheckType"/>
<enum-type name="MenuItemType"/>
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionProgressBar" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionProgressBar *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionProgressBar"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionProgressBar *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionRubberBand" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionRubberBand *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionRubberBand"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionRubberBand *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionSlider" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSlider *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionSlider"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSlider *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionSpinBox" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSpinBox *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionSpinBox"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionSpinBox *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionTab" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTab *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionTab"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTab *&gt;(%B) != nullptr">
<enum-type name="CornerWidget" flags="CornerWidgets"/>
<enum-type name="SelectedPosition"/>
<enum-type name="StyleOptionType"/>
@@ -139,36 +149,41 @@
<enum-type name="TabFeature" flags="TabFeatures"/>
<enum-type name="TabPosition"/>
</object-type>
- <object-type name="QStyleOptionTabBarBase" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTabBarBase *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionTabBarBase"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTabBarBase *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionTabWidgetFrame" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTabWidgetFrame *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionTabWidgetFrame"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTabWidgetFrame *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionTitleBar" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTitleBar *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionTitleBar" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionTitleBar *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
</object-type>
- <object-type name="QStyleOptionToolBar" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolBar *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionToolBar"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolBar *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
<enum-type name="ToolBarFeature" flags="ToolBarFeatures"/>
<enum-type name="ToolBarPosition"/>
</object-type>
- <object-type name="QStyleOptionToolBox" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolBox *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionToolBox"
+ polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolBox *&gt;(%B) != nullptr">
<enum-type name="SelectedPosition"/>
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
<enum-type name="TabPosition"/>
</object-type>
- <object-type name="QStyleOptionToolButton" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolButton *&gt;(%1) != nullptr">
+ <object-type name="QStyleOptionToolButton" polymorphic-id-expression="qstyleoption_cast&lt;const QStyleOptionToolButton *&gt;(%B) != nullptr">
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
<enum-type name="ToolButtonFeature" flags="ToolButtonFeatures"/>
</object-type>
- <value-type name="QStyleOptionViewItem" polymorphic-id-expression="%1-&gt;type == QStyleOptionViewItem::Type &amp;&amp; %1-&gt;version == QStyleOptionViewItem::Version">
+ <value-type name="QStyleOptionViewItem"
+ polymorphic-id-expression="%B-&gt;type == QStyleOptionViewItem::Type &amp;&amp; %B-&gt;version == QStyleOptionViewItem::Version">
<enum-type name="Position"/>
<enum-type name="StyleOptionType"/>
<enum-type name="StyleOptionVersion"/>
@@ -183,7 +198,7 @@
<value-type name="QSizePolicy">
<enum-type name="ControlType" flags="ControlTypes"/>
<enum-type name="Policy"/>
- <enum-type name="PolicyFlag"/>
+ <enum-type name="PolicyFlag" python-type="IntFlag"/>
</value-type>
<value-type name="QTableWidgetSelectionRange"/>
@@ -318,7 +333,7 @@
<modify-argument index="1">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtWidgets.QGraphicsItem]">
<replace-type modified-type="(retval, blockingPanel)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-isblockedbymodalpanel"/>
@@ -328,7 +343,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtGui.QTransform, bool]">
<replace-type modified-type="(QTransform, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -388,7 +403,7 @@
<enum-type name="SelectionMode"/>
<enum-type name="State"/>
<modify-function signature="setModel(QAbstractItemModel*)">
- <modify-argument index="1">
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtCore.QAbstractItemModel]">
<reference-count action="set"/>
</modify-argument>
</modify-function>
@@ -475,8 +490,10 @@
</object-type>
<object-type name="QDateEdit"/>
<object-type name="QDialog">
- <enum-type name="DialogCode"/>
- <modify-function signature="exec()" allow-thread="yes"/>
+ <enum-type name="DialogCode" python-type="IntEnum"/>
+ <modify-function signature="exec()" allow-thread="yes">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qdialog-exec-remove-parent-relation"/>
+ </modify-function>
<add-function signature="exec_()" return-type="int">
<inject-code file="../glue/qtwidgets.cpp" snippet="qapplication-exec"/>
</add-function>
@@ -520,12 +537,23 @@
</modify-function>
</object-type>
<object-type name="QWizardPage">
+ <extra-includes>
+ <include file-name="pysidesignal.h" location="global"/>
+ </extra-includes>
<modify-function signature="wizard()const">
<modify-argument index="this">
<parent index="return" action="add"/>
</modify-argument>
</modify-function>
- <modify-function signature="registerField(const QString&amp;,QWidget*,const char*,const char*)" allow-thread="yes"/>
+ <modify-function signature="registerField(const QString&amp;,QWidget*,const char*,const char*)" allow-thread="yes">
+ <modify-argument index="3" pyi-type="str" rename="property"/>
+ <modify-argument index="4" pyi-type="str" rename="changed_signal"/>
+ </modify-function>
+ <add-function signature="registerField(const QString&amp;@name@,QWidget*@widget@,const char*@property@,PySideSignalInstance@changedSignal@)">
+ <modify-argument index="3" pyi-type="str"/>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp"
+ snippet="qwizardpage-registerfield"/>
+ </add-function>
</object-type>
<object-type name="QFocusFrame">
<modify-function signature="setWidget(QWidget*)">
@@ -543,7 +571,7 @@
<modify-argument index="1">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QFont]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -554,7 +582,7 @@
<modify-argument index="1">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, PySide6.QtGui.QFont]">
<replace-type modified-type="PyTuple"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -870,7 +898,6 @@
</object-type>
<object-type name="QMenuBar">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-addaction-glue"/>
<modify-function signature="addMenu(QMenu*)">
<modify-argument index="return">
<parent index="1" action="add"/>
@@ -1064,12 +1091,14 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QWidgetItem" polymorphic-id-expression="%1-&gt;widget()"/>
+ <object-type name="QWidgetItem" polymorphic-id-expression="%B-&gt;widget()"/>
- <object-type name="QGraphicsSceneContextMenuEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneContextMenu">
+ <object-type name="QGraphicsSceneContextMenuEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneContextMenu">
<enum-type name="Reason"/>
</object-type>
- <object-type name="QGraphicsSceneDragDropEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneDragEnter || %1-&gt;type() == QEvent::GraphicsSceneDragLeave || %1-&gt;type() == QEvent::GraphicsSceneDragMove || %1-&gt;type() == QEvent::GraphicsSceneDrop" >
+ <object-type name="QGraphicsSceneDragDropEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneDragEnter || %B-&gt;type() == QEvent::GraphicsSceneDragLeave || %B-&gt;type() == QEvent::GraphicsSceneDragMove || %B-&gt;type() == QEvent::GraphicsSceneDrop" >
<!-- ### "setMimeData(const QMimeData*)" is an internal method. -->
<modify-function signature="setMimeData(const QMimeData*)" remove="all"/>
<!-- ### "setSource(QWidget*)" is an internal method. -->
@@ -1080,14 +1109,21 @@
<!-- ### "setWidget(QWidget*)" is an internal method. -->
<modify-function signature="setWidget(QWidget*)" remove="all"/>
</object-type>
- <object-type name="QGraphicsSceneMoveEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneMove"/>
- <object-type name="QGraphicsSceneResizeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneResize"/>
- <object-type name="QGraphicsSceneHelpEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneHelp"/>
- <object-type name="QGraphicsSceneHoverEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneHoverEnter || %1-&gt;type() == QEvent::GraphicsSceneHoverLeave || %1-&gt;type() == QEvent::GraphicsSceneHoverMove"/>
- <object-type name="QGraphicsSceneMouseEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneMouseDoubleClick || %1-&gt;type() == QEvent::GraphicsSceneMouseMove || %1-&gt;type() == QEvent::GraphicsSceneMousePress || %1-&gt;type() == QEvent::GraphicsSceneMouseRelease"/>
- <object-type name="QGraphicsSceneWheelEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::GraphicsSceneWheel"/>
-
- <object-type name="QGestureEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Gesture || %1-&gt;type() == QEvent::GestureOverride" since="4.6">
+ <object-type name="QGraphicsSceneMoveEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneMove"/>
+ <object-type name="QGraphicsSceneResizeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneResize"/>
+ <object-type name="QGraphicsSceneHelpEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneHelp"/>
+ <object-type name="QGraphicsSceneHoverEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneHoverEnter || %B-&gt;type() == QEvent::GraphicsSceneHoverLeave || %B-&gt;type() == QEvent::GraphicsSceneHoverMove"/>
+ <object-type name="QGraphicsSceneMouseEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneMouseDoubleClick || %B-&gt;type() == QEvent::GraphicsSceneMouseMove || %B-&gt;type() == QEvent::GraphicsSceneMousePress || %B-&gt;type() == QEvent::GraphicsSceneMouseRelease"/>
+ <object-type name="QGraphicsSceneWheelEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::GraphicsSceneWheel"/>
+
+ <object-type name="QGestureEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Gesture || %B-&gt;type() == QEvent::GestureOverride" since="4.6">
<modify-function signature="activeGestures()const">
<modify-argument index="return">
<define-ownership owner="default"/>
@@ -1120,17 +1156,17 @@
</add-function>
</object-type>
<object-type name="QStyle">
- <enum-type name="ComplexControl"/>
- <enum-type name="ContentsType"/>
- <enum-type name="ControlElement"/>
- <enum-type name="PixelMetric"/>
- <enum-type name="PrimitiveElement"/>
+ <enum-type name="ComplexControl" python-type="IntEnum"/>
+ <enum-type name="ContentsType" python-type="IntEnum"/>
+ <enum-type name="ControlElement" python-type="IntEnum"/>
+ <enum-type name="PixelMetric" python-type="IntEnum"/>
+ <enum-type name="PrimitiveElement" python-type="IntEnum"/>
<enum-type name="RequestSoftwareInputPanel" since="4.6"/>
- <enum-type name="StandardPixmap"/>
+ <enum-type name="StandardPixmap" python-type="IntEnum"/>
<enum-type name="StateFlag" flags="State"/>
- <enum-type name="StyleHint"/>
+ <enum-type name="StyleHint" python-type="IntEnum"/>
<enum-type name="SubControl" flags="SubControls"/>
- <enum-type name="SubElement"/>
+ <enum-type name="SubElement" python-type="IntEnum"/>
<modify-function signature="drawComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,QPainter*,const QWidget*)const">
<modify-argument index="3" invalidate-after-use="yes"/>
<modify-argument index="4">
@@ -1179,7 +1215,8 @@
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp"
+ snippet="addownership-item-at"/>
</modify-function>
<modify-function signature="removeWidget(QWidget*)">
@@ -1313,7 +1350,8 @@
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp"
+ snippet="addownership-item-at"/>
</modify-function>
<modify-function signature="addWidget(QWidget*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
<modify-argument index="4">
@@ -1383,7 +1421,7 @@
<enum-type name="ViewportAnchor"/>
<enum-type name="ViewportUpdateMode"/>
<modify-function signature="setScene(QGraphicsScene*)">
- <modify-argument index="1">
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QGraphicsScene]">
<reference-count action="set"/>
</modify-argument>
</modify-function>
@@ -1448,6 +1486,7 @@
<enum-type name="InputMode"/>
<modify-function signature="getInt(QWidget*,const QString&amp;,const QString&amp;,int,int,int,int,bool*,QFlags&lt;Qt::WindowType&gt;)" allow-thread="yes">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]"/>
<modify-argument index="8">
<remove-default-expression/>
<remove-argument/>
@@ -1458,6 +1497,7 @@
</modify-function>
<modify-function signature="getItem(QWidget*,const QString&amp;,const QString&amp;,const QStringList&amp;,int,bool,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-argument index="return" pyi-type="Tuple[str, bool]"/>
<modify-argument index="7">
<remove-default-expression/>
<remove-argument/>
@@ -1468,6 +1508,7 @@
</modify-function>
<modify-function signature="getMultiLineText(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-argument index="return" pyi-type="Tuple[str, bool]"/>
<modify-argument index="5">
<remove-default-expression/>
<remove-argument/>
@@ -1478,6 +1519,7 @@
</modify-function>
<modify-function signature="getText(QWidget*,const QString&amp;,const QString&amp;,QLineEdit::EchoMode,const QString&amp;,bool*,QFlags&lt;Qt::WindowType&gt;,QFlags&lt;Qt::InputMethodHint&gt;)" allow-thread="yes">
+ <modify-argument index="return" pyi-type="Tuple[str, bool]"/>
<modify-argument index="6">
<remove-default-expression/>
<remove-argument/>
@@ -1488,6 +1530,7 @@
</modify-function>
<modify-function signature="getDouble(QWidget*,const QString&amp;,const QString&amp;,double,double,double,int,bool*,QFlags&lt;Qt::WindowType&gt;,double)" allow-thread="yes">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]"/>
<modify-argument index="8">
<remove-default-expression/>
<remove-argument/>
@@ -1748,7 +1791,7 @@
<modify-function signature="closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)" allow-thread="yes"/>
</object-type>
<object-type name="QTableWidgetItem" >
- <enum-type name="ItemType"/>
+ <enum-type name="ItemType" python-type="IntEnum"/>
<modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
@@ -1757,7 +1800,7 @@
</modify-function>
</object-type>
<object-type name="QListWidgetItem" >
- <enum-type name="ItemType"/>
+ <enum-type name="ItemType" python-type="IntEnum"/>
<modify-function signature="QListWidgetItem(const QString&amp;,QListWidget*,int)">
<modify-argument index="this">
<parent index="2" action="add"/>
@@ -1817,7 +1860,7 @@
</object-type>
<object-type name="QTreeWidgetItem" hash-function="qHash" parent-management="true">
<enum-type name="ChildIndicatorPolicy"/>
- <enum-type name="ItemType"/>
+ <enum-type name="ItemType" python-type="IntEnum"/>
<modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>
@@ -1940,6 +1983,9 @@
<object-type name="QWidget" delete-in-main-thread="true">
<!-- see QWindow::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
<inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-addaction-glue"/>
+ <inject-code class="native" position="beginning">
+ #include &lt;QtWidgets/qapplication.h&gt;
+ </inject-code>
<modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
<modify-argument index="3">
<remove-argument/>
@@ -1959,8 +2005,10 @@
</modify-function>
<extra-includes>
+ <include file-name="QApplication" location="global"/>
<include file-name="QIcon" location="global"/>
<include file-name="QMessageBox" location="global"/>
+ <include file-name="QStyle" location="global"/>
</extra-includes>
<inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp"
@@ -1973,12 +2021,14 @@
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
</modify-function>
<modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
</modify-function>
<modify-function signature="parentWidget()const">
@@ -2239,6 +2289,7 @@
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
</modify-function>
<modify-function signature="window()const">
@@ -2251,7 +2302,8 @@
<object-type name="QMessageBox">
<enum-type name="ButtonRole"/>
<enum-type name="Icon"/>
- <enum-type name="StandardButton" flags="StandardButtons"/>
+ <enum-type name="StandardButton" python-type="IntFlag" flags="StandardButtons"/>
+ <enum-type name="Option" flags="Options" since="6.6"/>
<modify-function signature="removeButton(QAbstractButton*)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -2261,10 +2313,19 @@
<include file-name="QPixmap" location="global"/>
</extra-includes>
+ <!-- FIXME PYSIDE-7: Remove deprecated overloads -->
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="QMessageBox(const QString&amp;,const QString&amp;,QMessageBox::Icon,int,int,int,QWidget*,QFlags&lt;Qt::WindowType&gt;)" remove="all"/>
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
@@ -2281,7 +2342,7 @@
<enum-type name="ButtonSymbols"/>
<enum-type name="CorrectionMode"/>
<enum-type name="StepEnabledFlag" flags="StepEnabled"/>
- <enum-type name="StepType" since="5.12"/>
+ <enum-type name="StepType"/>
<modify-function signature="setLineEdit(QLineEdit*)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -2416,7 +2477,7 @@
<modify-function signature="getExistingDirectory(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QFileDialog::Option>)" allow-thread="yes"/>
<modify-function signature="getExistingDirectoryUrl(QWidget*,const QString&amp;,const QUrl&amp;,QFlags&lt;QFileDialog::Option>,const QStringList&amp;)" allow-thread="yes"/>
<modify-function signature="getOpenFileName(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[str, str]">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2426,7 +2487,7 @@
<inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
</modify-function>
<modify-function signature="getOpenFileNames(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[List[str], str]">
<replace-type modified-type="(fileNames, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2437,7 +2498,7 @@
</modify-function>
<modify-function signature="getOpenFileUrl(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QUrl, str]">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2448,7 +2509,7 @@
</modify-function>
<modify-function signature="getOpenFileUrls(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[List[PySide6.QtCore.QUrl], str]">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2459,7 +2520,7 @@
</modify-function>
<modify-function signature="getSaveFileName(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[str, str]">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2470,7 +2531,7 @@
</modify-function>
<modify-function signature="getSaveFileUrl(QWidget*,const QString&amp;,const QUrl&amp;,const QString&amp;,QString*,QFlags&lt;QFileDialog::Option&gt;,const QStringList&amp;)" allow-thread="yes">
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QUrl, str]">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
<modify-argument index="5">
@@ -2706,8 +2767,8 @@
</modify-function>
</object-type>
<object-type name="QFrame">
- <enum-type name="Shadow"/>
- <enum-type name="Shape"/>
+ <enum-type name="Shadow" python-type="IntEnum"/>
+ <enum-type name="Shape" python-type="IntEnum"/>
<enum-type name="StyleMask"/>
</object-type>
<object-type name="QSpinBox"/>
@@ -2860,9 +2921,9 @@
<object-type name="QCommandLinkButton"/>
<!-- FIXME PYSIDE7: Move to QtGui -->
- <object-type name="QFileSystemModel" polymorphic-id-expression="qobject_cast&lt;QFileSystemModel*&gt;(%1)">
- <enum-type name="Roles"/>
- <enum-type name="Option" flags="Options" since="5.14"/>
+ <object-type name="QFileSystemModel" polymorphic-id-expression="qobject_cast&lt;QFileSystemModel*&gt;(%B)">
+ <enum-type name="Roles" python-type="IntEnum"/>
+ <enum-type name="Option" flags="Options"/>
<modify-function signature="setIconProvider(QAbstractFileIconProvider*)">
<modify-argument index="1">
<parent index="this" action="add"/>
@@ -2878,6 +2939,9 @@
<enum-type name="ItemRole"/>
<enum-type name="RowWrapPolicy"/>
+ <value-type name="TakeRowResult">
+ <include file-name="QFormLayout" location="global"/>
+ </value-type>
<modify-function signature="getLayoutPosition(QLayout*,int*,QFormLayout::ItemRole*)const">
<modify-argument index="0">
@@ -3282,6 +3346,16 @@
</object-type>
<object-type name="QGestureRecognizer" since="4.6">
<enum-type name="ResultFlag" flags="Result"/>
+ <modify-function signature="create(QObject*)">
+ <modify-argument index="return">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="registerRecognizer(QGestureRecognizer*)">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
</object-type>
<object-type name="QTapAndHoldGesture" since="4.6"/>
<object-type name="QTapGesture" since="4.6"/>
@@ -3307,6 +3381,12 @@
<object-type name="QPinchGesture" since="4.6">
<enum-type name="ChangeFlag" flags="ChangeFlags"/>
</object-type>
+
+ <object-type name="QRhiWidget" since="6.7">
+ <enum-type name="Api"/>
+ <enum-type name="TextureFormat"/>
+ </object-type>
+
<object-type name="QSwipeGesture" since="4.6">
<enum-type name="SwipeDirection"/>
</object-type>
@@ -3338,21 +3418,6 @@
<!-- The above entries may be present in the system or not. Keep this section organized. -->
- <!-- This enum is present on QtCore -->
- <suppress-warning text="enum 'QCoreApplication::ApplicationFlags' is specified in typesystem, but not declared"/>
- <suppress-warning text="QGraphicsEllipseItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsItemGroup::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsItem::UserType' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsLineItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsPathItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsPixmapItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsPolygonItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsProxyWidget::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsRectItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsSimpleTextItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsSvgItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsTextItem::Type' does not have a type entry or is not an enum"/>
- <suppress-warning text="QGraphicsWidget::Type' does not have a type entry or is not an enum"/>
<suppress-warning text="signal 'activated' in class 'QCompleter' is overloaded."/>
<suppress-warning text="signal 'highlighted' in class 'QCompleter' is overloaded."/>
</typesystem>
diff --git a/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt b/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt
deleted file mode 100644
index de86cc7c5..000000000
--- a/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-project(QtWinExtras)
-
-set(QtWinExtras_SRC
-${QtWinExtras_GEN_DIR}/qtwin_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwincolorizationchangeevent_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwincompositionchangeevent_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinevent_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinjumplist_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinjumplistcategory_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinjumplistitem_wrapper.cpp
-#${QtWinExtras_GEN_DIR}/qwinmime_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwintaskbarbutton_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwintaskbarprogress_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinthumbnailtoolbar_wrapper.cpp
-${QtWinExtras_GEN_DIR}/qwinthumbnailtoolbutton_wrapper.cpp
-
-# module is always needed
-${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 pyside6
- ${Qt${QT_MAJOR_VERSION}WinExtras_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
-
-set(QtWinExtras_deps QtCore QtGui QtWidgets)
-
-create_pyside_module(NAME QtWinExtras
- INCLUDE_DIRS QtWinExtras_include_dirs
- LIBRARIES QtWinExtras_libraries
- DEPS QtWinExtras_deps
- TYPESYSTEM_PATH QtWinExtras_SOURCE_DIR
- SOURCES QtWinExtras_SRC)
diff --git a/sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in b/sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in
deleted file mode 100644
index 21285e301..000000000
--- a/sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in
+++ /dev/null
@@ -1,5 +0,0 @@
-// QT_WIDGETS_LIB must be defined for the widget functions to become visible.
-
-#if @Qt6Widgets_FOUND@
-# define QT_WIDGETS_LIB
-#endif
diff --git a/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml b/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml
deleted file mode 100644
index 2d3025bbb..000000000
--- a/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
--->
-<typesystem package="PySide6.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"/>
- <enum-type name="WindowFlip3DPolicy"/>
- </namespace-type>
- <object-type name="QWinEvent" since="5.2"/>
- <object-type name="QWinColorizationChangeEvent" since="5.2"/>
- <object-type name="QWinCompositionChangeEvent" since="5.2"/>
- <object-type name="QWinJumpList" since="5.2"/>
- <object-type name="QWinJumpListCategory" since="5.2">
- <enum-type name="Type"/>
- </object-type>
- <object-type name="QWinJumpListItem" since="5.2">
- <enum-type name="Type"/>
- </object-type>
- <!-- <object-type name="QWinMime" since="5.4"/> -->
- <object-type name="QWinTaskbarButton" since="5.2"/>
- <object-type name="QWinTaskbarProgress" since="5.2"/>
- <object-type name="QWinThumbnailToolBar" since="5.2"/>
- <object-type name="QWinThumbnailToolButton" since="5.2"/>
-</typesystem>
diff --git a/sources/pyside6/PySide6/QtXml/CMakeLists.txt b/sources/pyside6/PySide6/QtXml/CMakeLists.txt
index ffb073f69..b0e4630dd 100644
--- a/sources/pyside6/PySide6/QtXml/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtXml/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(QtXml)
set(QtXml_SRC
@@ -6,6 +9,7 @@ ${QtXml_GEN_DIR}/qdomcdatasection_wrapper.cpp
${QtXml_GEN_DIR}/qdomcharacterdata_wrapper.cpp
${QtXml_GEN_DIR}/qdomcomment_wrapper.cpp
${QtXml_GEN_DIR}/qdomdocument_wrapper.cpp
+${QtXml_GEN_DIR}/qdomdocument_parseresult_wrapper.cpp
${QtXml_GEN_DIR}/qdomdocumentfragment_wrapper.cpp
${QtXml_GEN_DIR}/qdomdocumenttype_wrapper.cpp
${QtXml_GEN_DIR}/qdomelement_wrapper.cpp
diff --git a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml
index 4645f7b91..3661a67bf 100644
--- a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml
+++ b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml
@@ -3,14 +3,12 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
-<typesystem package="PySide6.QtXml">
+<typesystem package="PySide6.QtXml"
+ namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no" />
<load-typesystem name="templates/core_common.xml" generate="no" />
- <rejection class="QXmlAttributes::Attribute"/>
<rejection class="QDomNode" field-name="impl"/>
- <rejection class="QXmlInputSource" field-name="EndOfData"/>
- <rejection class="QXmlInputSource" field-name="EndOfDocument"/>
<value-type name="QDomAttr"/>
<value-type name="QDomCDATASection"/>
@@ -19,7 +17,11 @@
<value-type name="QDomDocument">
+ <enum-type name="ParseOption" flags="ParseOptions" since="6.5"/>
<!-- will be replaced in inject code -->
+
+ <value-type name="ParseResult"/>
+
<modify-function signature="setContent(const QByteArray&amp;,bool,QString*,int*,int*)">
<modify-argument index="3">
<remove-argument/>
@@ -33,7 +35,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -51,7 +53,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -69,7 +71,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -87,7 +89,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -105,7 +107,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -123,7 +125,7 @@
<remove-argument/>
<remove-default-expression/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, str, int, int]">
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
@@ -167,12 +169,5 @@
<modify-function signature="setAttribute(const QString&amp;, qulonglong)" remove="all"/>
</value-type>
- <object-type name="QXmlContentHandler">
- <modify-function signature="setDocumentLocator(QXmlLocator*)">
- <modify-argument index="1">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
</typesystem>
diff --git a/sources/pyside6/PySide6/__init__.py.in b/sources/pyside6/PySide6/__init__.py.in
index 8f6c47b87..d0a4ecc37 100644
--- a/sources/pyside6/PySide6/__init__.py.in
+++ b/sources/pyside6/PySide6/__init__.py.in
@@ -68,26 +68,6 @@ def _setupQtDirectories():
file=sys.stderr)
raise
- # Trigger signature initialization.
- try:
- # PYSIDE-829: Avoid non-existent attributes in compiled code (Nuitka).
- # We now use an explicit function instead of touching a signature.
- _init_pyside_extension()
- except (AttributeError, NameError):
- stars = 79 * "*"
- fname = Shiboken.__file__
- print(dedent(f'''\
- {stars}
- PySide6/__init__.py: The `signature` module was not initialized.
- This libshiboken module was loaded from
-
- "{fname}".
-
- Please make sure that this is the real Shiboken binary and not just a folder.
- {stars}
- '''), file=sys.stderr)
- raise
-
if sys.platform == 'win32':
# PATH has to contain the package directory, otherwise plugins
# won't be able to find their required Qt libraries (e.g. the
diff --git a/sources/pyside6/PySide6/_config.py.in b/sources/pyside6/PySide6/_config.py.in
index 740e9a001..27ee0789b 100644
--- a/sources/pyside6/PySide6/_config.py.in
+++ b/sources/pyside6/PySide6/_config.py.in
@@ -14,3 +14,4 @@ version_info = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDI
@PACKAGE_BUILD_COMMIT_HASH_DESCRIBED@
@PACKAGE_SETUP_PY_PACKAGE_TIMESTAMP_ASSIGNMENT@
@PACKAGE_SETUP_PY_PACKAGE_VERSION_ASSIGNMENT@
+@QT_MACOS_DEPLOYMENT_TARGET@
diff --git a/sources/pyside6/PySide6/doc/qtqml_functions.rst b/sources/pyside6/PySide6/doc/qtqml_functions.rst
new file mode 100644
index 000000000..31801b245
--- /dev/null
+++ b/sources/pyside6/PySide6/doc/qtqml_functions.rst
@@ -0,0 +1,152 @@
+// @snippet qmlregistersingletoninstance
+.. py:function:: qmlRegisterSingletonInstance(pytype: type,\
+ uri: str,\
+ versionMajor: int,\
+ versionMinor: int,\
+ typeName: str,\
+ instanceObject: object) -> int
+
+ :param type pytype: Python class
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str typeName: name exposed to QML
+ :param object instanceObject: singleton object to be registered
+ :return: int (the QML type id)
+
+This function registers a singleton Python object *instanceObject*, with a
+particular *uri* and *typeName*. Its version is a combination of *versionMajor*
+and *versionMinor*. Use this function to register an object of the given type
+*pytype* as a singleton type.
+// @snippet qmlregistersingletoninstance
+
+// @snippet qmlregistersingletontype_qobject_nocallback
+.. py:function:: qmlRegisterSingletonType(pytype: type, uri: str, versionMajor: int, versionMinor: int, typeName: str) -> int
+
+ :param type pytype: Python class
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str typeName: name exposed to QML
+ :return: int (the QML type id)
+
+This function registers a Python type as a singleton in the QML system.
+
+Alternatively, the :ref:`QmlSingleton` decorator can be used.
+// @snippet qmlregistersingletontype_qobject_nocallback
+
+// @snippet qmlregistersingletontype_qobject_callback
+.. py:function:: qmlRegisterSingletonType(pytype: type, uri: str, versionMajor: int, versionMinor: int, typeName: str, callback: object) -> int
+
+ :param type pytype: Python class
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str typeName: name exposed to QML
+ :param object callback: Python callable (to handle Python type)
+ :return: int (the QML type id)
+
+This function registers a Python type as a singleton in the QML system using
+the provided callback (which gets a QQmlEngine as a parameter) to generate the
+singleton.
+// @snippet qmlregistersingletontype_qobject_callback
+
+// @snippet qmlregistersingletontype_qjsvalue
+.. py:function:: qmlRegisterSingletonType(uri: str, versionMajor: int, versionMinor: int, typeName: str, callback: object) -> int
+
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str typeName: name exposed to QML
+ :param object callback: Python callable (to handle QJSValue)
+ :return: int (the QML type id)
+
+This function registers a QJSValue as a singleton in the QML system using the
+provided callback (which gets a QQmlEngine as a parameter) to generate the
+singleton.
+// @snippet qmlregistersingletontype_qjsvalue
+
+// @snippet qmlregistertype
+.. py:function:: qmlRegisterType(pytype: type, uri: str, versionMajor: int, versionMinor: int, qmlName: str) -> int
+
+ :param type pytype: Python class
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str qmlName: name exposed to QML
+ :return: int (the QML type id)
+
+This function registers the Python *type* in the QML system with the name
+*qmlName*, in the library imported from *uri* having the version number
+composed from *versionMajor* and *versionMinor*. For example, this registers a
+Python class 'MySliderItem' as a QML type named 'Slider' for version '1.0' of a
+module called 'com.mycompany.qmlcomponents':
+
+ ::
+
+ qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider")
+
+Once this is registered, the type can be used in QML by importing the specified
+module name and version number:
+
+ ::
+
+ import com.mycompany.qmlcomponents 1.0
+
+ Slider { ... }
+
+Note that it's perfectly reasonable for a library to register types to older
+versions than the actual version of the library. Indeed, it is normal for the
+new library to allow QML written to previous versions to continue to work, even
+if more advanced versions of some of its types are available.
+// @snippet qmlregistertype
+
+// @snippet qmlregisteruncreatabletype
+.. py:function:: qmlRegisterUncreatableType(pytype: type, uri: str, versionMajor: int, versionMinor: int, qmlName: str, noCreationReason: str) -> int
+
+ :param type pytype: Python class
+ :param str uri: uri to use while importing the component in QML
+ :param int versionMajor: major version
+ :param int versionMinor: minor version
+ :param str qmlName: name exposed to QML
+ :param str noCreationReason: Error message shown when trying to create the QML type
+ :return: int (the QML type id)
+
+This function registers the Python *type* in the QML system as an uncreatable
+type with the name *qmlName*, in the library imported from *uri* having the
+version number composed from *versionMajor* and *versionMinor*, showing
+*noCreationReason* as an error message when creating the type is attempted. For
+example, this registers a Python class 'MySliderItem' as a QML type named
+'Slider' for version '1.0' of a module called 'com.mycompany.qmlcomponents':
+
+ ::
+ qmlRegisterUncreatableType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider", "Slider cannot be created.")
+
+Note that it's perfectly reasonable for a library to register types to older
+versions than the actual version of the library. Indeed, it is normal for the
+new library to allow QML written to previous versions to continue to work, even
+if more advanced versions of some of its types are available.
+
+Alternatively, the :ref:`QmlUncreatable` decorator can be used.
+// @snippet qmlregisteruncreatabletype
+
+// @snippet qqmlengine-singletoninstance-qmltypeid
+Returns the instance of a singleton type that was registered under qmlTypeId.
+For ``QObject``-derived singleton types, the ``QObject`` instance is returned,
+otherwise a ``QJSValue`` or ``None``.
+
+It is recommended to store the QML type id, e.g. as a static member in the
+singleton class. The lookup via qmlTypeId() is costly.
+// @snippet qqmlengine-singletoninstance-qmltypeid
+
+// @snippet qqmlengine-singletoninstance-typename Returns the instance of a
+singleton type named typeName from the module specified by uri.
+For ``QObject``-derived singleton types, the ``QObject`` instance is returned,
+otherwise a ``QJSValue`` or ``None``.
+
+This method can be used as an alternative to calling qmlTypeId followed by the
+id based overload of singletonInstance. This is convenient when one only needs
+to do a one time setup of a singleton; if repeated access to the singleton is
+required, caching its typeId will allow faster subsequent access via the
+type-id based overload.
+// @snippet qqmlengine-singletoninstance-typename
diff --git a/sources/pyside6/PySide6/doc/qtquicktest.rst b/sources/pyside6/PySide6/doc/qtquicktest.rst
new file mode 100644
index 000000000..9df2af071
--- /dev/null
+++ b/sources/pyside6/PySide6/doc/qtquicktest.rst
@@ -0,0 +1,62 @@
+// @snippet quick_test_main_documentation
+
+Sets up the entry point for a Qt Quick Test application.
+The ``name`` argument uniquely identifies this set of tests.
+
+``sys.argv`` should be passed to the ``argv`` argument to ensure
+propagation of the command line arguments.
+
+.. note:: The function assumes that your test sources are in the current
+ directory, unless the ``QUICK_TEST_SOURCE_DIR`` environment
+ variable is set or a directory is passed in ``dir``.
+
+The following snippet demonstrates the use of this function:
+
+.. code-block:: Python
+
+ import sys
+ from PySide6.QtQuickTest import QUICK_TEST_MAIN
+
+ ex = QUICK_TEST_MAIN("example", sys.argv)
+ sys.exit(ex)
+
+
+// @snippet quick_test_main_documentation
+
+// @snippet quick_test_main_with_setup_documentation
+
+Sets up the entry point for a Qt Quick Test application.
+The ``name`` argument uniquely identifies this set of tests.
+
+``sys.argv`` should be passed to the ``argv`` argument to ensure
+propagation of the command line arguments.
+
+This function is identical to ``QUICK_TEST_MAIN()``, except that it takes an
+additional argument ``setup``, the type of a ``QObject``-derived
+class which will be instantiated. With this class, it is possible to define
+additional setup code to execute before running the QML test.
+
+The following snippet demonstrates the use of this function:
+
+.. code-block:: Python
+
+ import sys
+ from PySide6.QtQuickTest import QUICK_TEST_MAIN_WITH_SETUP
+
+ class CustomTestSetup(QObject):
+ def __init__(self, parent=None):
+ super().__init__(parent)
+
+ @Slot(QQmlEngine)
+ def qmlEngineAvailable(self, qmlEngine):
+ pass
+
+ ex = QUICK_TEST_MAIN_WITH_SETUP("qquicktestsetup", CustomTestSetup, sys.argv)
+ sys.exit(ex)
+
+
+.. note:: The function assumes that your test sources are in the current
+ directory, unless the ``QUICK_TEST_SOURCE_DIR`` environment
+ variable is set or a directory is passed in ``dir``.
+
+// @snippet quick_test_main_with_setup_documentation
diff --git a/sources/pyside6/PySide6/doc/qtuitools.rst b/sources/pyside6/PySide6/doc/qtuitools.rst
new file mode 100644
index 000000000..a8856f1af
--- /dev/null
+++ b/sources/pyside6/PySide6/doc/qtuitools.rst
@@ -0,0 +1,68 @@
+// @snippet quiloader-registercustomwidget
+Registers a Python created custom widget to QUiLoader, so it can be recognized
+when loading a `.ui` file. The custom widget type is passed via the
+``customWidgetType`` argument. This is needed when you want to override a
+virtual method of some widget in the interface, since duck punching will not
+work with widgets created by QUiLoader based on the contents of the `.ui` file.
+
+(Remember that
+`duck punching virtual methods is an invitation for your own demise! <https://doc.qt.io/qtforpython/shiboken6/wordsofadvice.html#duck-punching-and-virtual-methods>`_)
+
+Let's see an obvious example. If you want to create a new widget it's probable you'll end up
+overriding :class:`~PySide6.QtGui.QWidget`'s :meth:`~PySide6.QtGui.QWidget.paintEvent` method.
+
+.. code-block:: python
+
+ class Circle(QWidget):
+ def paintEvent(self, event):
+ with QPainter(self) as painter:
+ painter.setPen(self.pen)
+ painter.setBrush(QBrush(self.color))
+ painter.drawEllipse(event.rect().center(), 20, 20)
+
+ # ...
+
+ loader = QUiLoader()
+ loader.registerCustomWidget(Circle)
+ circle = loader.load('circle.ui')
+ circle.show()
+
+ # ...
+// @snippet quiloader-registercustomwidget
+
+// @snippet loaduitype
+.. currentmodule:: PySide6.QtUiTools
+
+loadUiType
+***********
+.. py:function:: loadUiType(uifile: str) -> tuple(object, object)
+
+ :param str uifile: The name of the `.ui` file
+ :return: tuple(object, object)
+
+This function generates and loads a `.ui` file at runtime, and it returns
+a `tuple` containing the reference to the Python class, and the base class.
+
+We recommend not to use this approach as the workflow should be to generate a Python file
+from the `.ui` file, and then import and load it to use it, but we do understand that
+there are some corner cases when such functionality is required.
+
+The internal process relies on `uic` being in the PATH.
+The `pyside6-uic` wrapper uses a shipped `uic` that is located in the
+`site-packages/PySide6/uic`, so PATH needs to be updated to use that if there
+is no `uic` in the system.
+
+A simple use case is::
+
+ from PySide6.QtUiTools import loadUiType
+
+ generated_class, base_class = loadUiType("themewidget.ui")
+ # the values will be:
+ # (<class '__main__.Ui_ThemeWidgetForm'>, <class 'PySide6.QtWidgets.QWidget'>)
+
+ widget = base_class()
+ form = generated_class()
+ form.setupUi(widget)
+ # form.a_widget_member.a_method_of_member()
+ widget.show()
+// @snippet loaduitype
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index a2625e65b..bc51d26d7 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -11,6 +11,10 @@
#include "glue/core_snippets_p.h"
// @snippet include-pyside
+// @snippet core-snippets-p-h
+#include "glue/core_snippets_p.h"
+// @snippet core-snippets-p-h
+
// @snippet qarg_helper
// Helper for the Q_ARG/Q_RETURN_ARG functions, creating a meta type
@@ -25,25 +29,148 @@ struct QArgData
QArgData qArgDataFromPyType(PyObject *t)
{
- auto *pyType = reinterpret_cast<PyTypeObject *>(t);
QArgData result;
- result.metaType = PySide::qMetaTypeFromPyType(pyType);
+ const char *typeName{};
+ if (PyType_Check(t)) {
+ auto *pyType = reinterpret_cast<PyTypeObject *>(t);
+ typeName = pyType->tp_name;
+ result.metaType = PySide::qMetaTypeFromPyType(pyType);
+ } else if (PyUnicode_Check(t)) {
+ typeName = Shiboken::String::toCString(t);
+ result.metaType = QMetaType::fromName(typeName);
+ } else {
+ PyErr_Format(PyExc_RuntimeError, "%s: Parameter should be a type or type string.",
+ __FUNCTION__);
+ return result;
+ }
+
if (!result.metaType.isValid()) {
PyErr_Format(PyExc_RuntimeError, "%s: Unable to find a QMetaType for \"%s\".",
- __FUNCTION__, pyType->tp_name);
+ __FUNCTION__, typeName);
return result;
}
result.data = result.metaType.create();
if (result.data == nullptr) {
PyErr_Format(PyExc_RuntimeError, "%s: Unable to create an instance of \"%s\" (%s).",
- __FUNCTION__, pyType->tp_name, result.metaType.name());
+ __FUNCTION__, typeName, result.metaType.name());
return result;
}
return result;
}
// @snippet qarg_helper
+// @snippet settings-value-helpers
+// Convert a QVariant to a desired primitive type
+static PyObject *convertToPrimitiveType(const QVariant &out, int metaTypeId)
+{
+ switch (metaTypeId) {
+ case QMetaType::QByteArray:
+ return PyBytes_FromString(out.toByteArray().constData());
+ case QMetaType::QString:
+ return PyUnicode_FromString(out.toByteArray().constData());
+ case QMetaType::Short:
+ case QMetaType::Long:
+ case QMetaType::LongLong:
+ case QMetaType::UShort:
+ case QMetaType::ULong:
+ case QMetaType::ULongLong:
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ return PyLong_FromDouble(out.toFloat());
+ case QMetaType::Double:
+ case QMetaType::Float:
+ case QMetaType::Float16:
+ return PyFloat_FromDouble(out.toFloat());
+ case QMetaType::Bool:
+ if (out.toBool()) {
+ Py_INCREF(Py_True);
+ return Py_True;
+ }
+ Py_INCREF(Py_False);
+ return Py_False;
+ default:
+ break;
+ }
+ return nullptr;
+}
+
+// Helper for QSettings::value() to convert a value to the desired type
+static PyObject *settingsTypeCoercion(const QVariant &out, PyTypeObject *typeObj)
+{
+ if (typeObj == &PyList_Type) {
+ // Convert any string, etc, to a list of 1 element
+ if (auto *primitiveValue = convertToPrimitiveType(out, out.typeId())) {
+ PyObject *list = PyList_New(1);
+ PyList_SET_ITEM(list, 0, primitiveValue);
+ return list;
+ }
+
+ const QByteArray out_ba = out.toByteArray();
+ if (out_ba.isEmpty())
+ return PyList_New(0);
+
+ const QByteArrayList valuesList = out_ba.split(',');
+ const Py_ssize_t valuesSize = valuesList.size();
+ PyObject *list = PyList_New(valuesSize);
+ for (Py_ssize_t i = 0; i < valuesSize; ++i) {
+ PyObject *item = PyUnicode_FromString(valuesList.at(i).constData());
+ PyList_SET_ITEM(list, i, item);
+ }
+ return list;
+ }
+
+ if (typeObj == &PyBytes_Type)
+ return convertToPrimitiveType(out, QMetaType::QByteArray);
+ if (typeObj == &PyUnicode_Type)
+ return convertToPrimitiveType(out, QMetaType::QString);
+ if (typeObj == &PyLong_Type)
+ return convertToPrimitiveType(out, QMetaType::Int);
+ if (typeObj == &PyFloat_Type)
+ return convertToPrimitiveType(out, QMetaType::Double);
+ if (typeObj == &PyBool_Type)
+ return convertToPrimitiveType(out, QMetaType::Bool);
+
+ // TODO: PyDict_Type and PyTuple_Type
+ PyErr_SetString(PyExc_TypeError,
+ "Invalid type parameter.\n"
+ "\tUse 'list', 'bytes', 'str', 'int', 'float', 'bool', "
+ "or a Qt-derived type");
+ return nullptr;
+}
+
+static bool isEquivalentSettingsType(PyTypeObject *typeObj, int metaTypeId)
+{
+ switch (metaTypeId) {
+ case QMetaType::QVariantList:
+ case QMetaType::QStringList:
+ return typeObj == &PyList_Type;
+ case QMetaType::QByteArray:
+ return typeObj == &PyBytes_Type;
+ case QMetaType::QString:
+ return typeObj == &PyUnicode_Type;
+ case QMetaType::Short:
+ case QMetaType::Long:
+ case QMetaType::LongLong:
+ case QMetaType::UShort:
+ case QMetaType::ULong:
+ case QMetaType::ULongLong:
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ return typeObj == &PyLong_Type;
+ case QMetaType::Double:
+ case QMetaType::Float:
+ case QMetaType::Float16:
+ return typeObj == &PyFloat_Type;
+ case QMetaType::Bool:
+ return typeObj == &PyBool_Type;
+ default:
+ break;
+ }
+ return false;
+}
+// @snippet settings-value-helpers
+
// @snippet qsettings-value
// If we enter the kwds, means that we have a defaultValue or
// at least a type.
@@ -64,72 +191,31 @@ if ((kwds && PyDict_Size(kwds) > 0) || numArgs > 1) {
PyTypeObject *typeObj = reinterpret_cast<PyTypeObject*>(%PYARG_3);
-if (typeObj && !Shiboken::ObjectType::checkType(typeObj)) {
- if (typeObj == &PyList_Type) {
- QByteArray out_ba = out.toByteArray();
- if (!out_ba.isEmpty()) {
- QByteArrayList valuesList = out_ba.split(',');
- const Py_ssize_t valuesSize = valuesList.size();
- if (valuesSize > 0) {
- PyObject *list = PyList_New(valuesSize);
- for (Py_ssize_t i = 0; i < valuesSize; ++i) {
- PyObject *item = PyUnicode_FromString(valuesList.at(i).constData());
- PyList_SET_ITEM(list, i, item);
- }
- %PYARG_0 = list;
-
- } else {
- %PYARG_0 = %CONVERTTOPYTHON[QVariant](out);
- }
- } else {
- %PYARG_0 = PyList_New(0);
- }
- } else if (typeObj == &PyBytes_Type) {
- QByteArray asByteArray = out.toByteArray();
- %PYARG_0 = PyBytes_FromString(asByteArray.constData());
- } else if (typeObj == &PyUnicode_Type) {
- QByteArray asByteArray = out.toByteArray();
- %PYARG_0 = PyUnicode_FromString(asByteArray.constData());
- } else if (typeObj == &PyLong_Type) {
- float asFloat = out.toFloat();
- pyResult = PyLong_FromDouble(asFloat);
- } else if (typeObj == &PyFloat_Type) {
- float asFloat = out.toFloat();
- %PYARG_0 = PyFloat_FromDouble(asFloat);
- } else if (typeObj == &PyBool_Type) {
- if (out.toBool()) {
- Py_INCREF(Py_True);
- %PYARG_0 = Py_True;
- } else {
- Py_INCREF(Py_False);
- %PYARG_0 = Py_False;
- }
+if (typeObj && !Shiboken::ObjectType::checkType(typeObj)
+ && !isEquivalentSettingsType(typeObj, out.typeId())) {
+ %PYARG_0 = settingsTypeCoercion(out, typeObj);
+} else {
+ if (out.isValid()) {
+ %PYARG_0 = %CONVERTTOPYTHON[QVariant](out);
} else {
- // TODO: PyDict_Type and PyTuple_Type
- PyErr_SetString(PyExc_TypeError,
- "Invalid type parameter.\n"
- "\tUse 'list', 'bytes', 'str', 'int', 'float', 'bool', "
- "or a Qt-derived type");
- return nullptr;
- }
-}
-else {
- if (!out.isValid()) {
Py_INCREF(Py_None);
%PYARG_0 = Py_None;
- } else {
- %PYARG_0 = %CONVERTTOPYTHON[QVariant](out);
}
}
// @snippet qsettings-value
// @snippet metatype-from-type
-%0 = new %TYPE(PySide::qMetaTypeFromPyType(reinterpret_cast<PyTypeObject *&>(%1)));
+%0 = new %TYPE(PySide::qMetaTypeFromPyType(reinterpret_cast<PyTypeObject *>(%1)));
// @snippet metatype-from-type
+// @snippet metatype-from-metatype-type
+Shiboken::AutoDecRef intArg(PyObject_GetAttrString(%PYARG_1, "value"));
+%0 = new %TYPE(PyLong_AsLong(intArg));
+// @snippet metatype-from-metatype-type
+
// @snippet conversion-pytypeobject-qmetatype
-auto *pyType = reinterpret_cast<PyTypeObject *&>(%in);
+auto *pyType = reinterpret_cast<PyTypeObject *>(%in);
%out = PySide::qMetaTypeFromPyType(pyType);
// @snippet conversion-pytypeobject-qmetatype
@@ -146,7 +232,7 @@ static QVariant QVariant_convertToVariantMap(PyObject *map)
Py_ssize_t pos = 0;
Shiboken::AutoDecRef keys(PyDict_Keys(map));
if (!QVariant_isStringList(keys))
- return QVariant();
+ return {};
PyObject *key;
PyObject *value;
QMap<QString,QVariant> ret;
@@ -170,7 +256,7 @@ static QVariant QVariant_convertToVariantList(PyObject *list)
if (PySequence_Size(list) < 0) {
// clear the error if < 0 which means no length at all
PyErr_Clear();
- return QVariant();
+ return {};
}
QList<QVariant> lst;
@@ -183,6 +269,30 @@ static QVariant QVariant_convertToVariantList(PyObject *list)
}
return QVariant(lst);
}
+
+using SpecificConverter = Shiboken::Conversions::SpecificConverter;
+
+static std::optional<SpecificConverter> converterForQtType(const char *typeNameC)
+{
+ // Fix typedef "QGenericMatrix<3,3,float>" -> QMatrix3x3". The reverse
+ // conversion happens automatically in QMetaType::fromName() in
+ // QVariant_resolveMetaType().
+ QByteArrayView typeNameV(typeNameC);
+ if (typeNameV.startsWith("QGenericMatrix<") && typeNameV.endsWith(",float>")) {
+ QByteArray typeName = typeNameV.toByteArray();
+ typeName.remove(1, 7);
+ typeName.remove(7, 1); // '<'
+ typeName.chop(7);
+ typeName.replace(',', 'x');
+ SpecificConverter matrixConverter(typeName.constData());
+ if (matrixConverter)
+ return matrixConverter;
+ }
+ SpecificConverter converter(typeNameC);
+ if (converter)
+ return converter;
+ return std::nullopt;
+}
// @snippet qvariant-conversion
// @snippet qt-qabs
@@ -198,6 +308,18 @@ PySide::addPostRoutine(%1);
qAddPostRoutine(PySide::globalPostRoutineCallback);
// @snippet qt-qaddpostroutine
+// @snippet qcompress-buffer
+auto *ptr = reinterpret_cast<uchar*>(Shiboken::Buffer::getPointer(%PYARG_1));
+QByteArray compressed = %FUNCTION_NAME(ptr, %2, %3);
+%PYARG_0 = %CONVERTTOPYTHON[QByteArray](compressed);
+// @snippet qcompress-buffer
+
+// @snippet quncompress-buffer
+auto *ptr = reinterpret_cast<uchar*>(Shiboken::Buffer::getPointer(%PYARG_1));
+QByteArray uncompressed = %FUNCTION_NAME(ptr, %2);
+%PYARG_0 = %CONVERTTOPYTHON[QByteArray](uncompressed);
+// @snippet quncompress-buffer
+
// @snippet qt-version
QList<QByteArray> version = QByteArray(qVersion()).split('.');
PyObject *pyQtVersion = PyTuple_New(3);
@@ -235,6 +357,12 @@ PyModule_AddStringConstant(module, "__version__", qVersion());
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
// @snippet qobject-connect-4
+// @snippet qobject-connect-4-context
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = PySide::qobjectConnectCallback(%1, %2, %3, %PYARG_4, %5);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-connect-4-context
+
// @snippet qobject-connect-5
// %FUNCTION_NAME() - disable generation of function call.
%RETURN_TYPE %0 = PySide::qobjectConnectCallback(%CPPSELF, %1, %PYARG_2, %3);
@@ -291,10 +419,10 @@ PySide::Feature::init();
// @snippet qt-init-feature
// @snippet qt-pysideinit
-Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], "unicode");
-Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], "str");
-Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QTCORE_QLIST_QVARIANT_IDX], "QVariantList");
-Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QTCORE_QMAP_QSTRING_QVARIANT_IDX], "QVariantMap");
+Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], "unicode");
+Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], "str");
+Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QtCore_QList_QVariant_IDX], "QVariantList");
+Shiboken::Conversions::registerConverterName(SbkPySide6_QtCoreTypeConverters[SBK_QtCore_QMap_QString_QVariant_IDX], "QVariantMap");
PySide::registerInternalQtConf();
PySide::init(module);
@@ -344,8 +472,7 @@ if (%PYARG_0 == Py_None)
namespace PySide {
template<> inline Py_ssize_t hash(const QLine &l)
{
- const int v[4] = {l.x1(), l.y1(), l.x2(), l.y2()};
- return qHashRange(v, v + 4);
+ return qHashMulti(0, l.x1(), l.y1(), l.x2(), l.y2());
}
};
// @snippet qline-hash
@@ -403,6 +530,12 @@ QTime time(%4, %5, %6);
%0 = new %TYPE(date, time);
// @snippet qdatetime-2
+// @snippet qdatetime-3
+QDate date(%1, %2, %3);
+QTime time(%4, %5, %6, %7);
+%0 = new %TYPE(date, time, %8);
+// @snippet qdatetime-3
+
// @snippet qdatetime-topython
QDate date = %CPPSELF.date();
QTime time = %CPPSELF.time();
@@ -411,31 +544,6 @@ if (!PyDateTimeAPI)
%PYARG_0 = PyDateTime_FromDateAndTime(date.year(), date.month(), date.day(), time.hour(), time.minute(), time.second(), time.msec()*1000);
// @snippet qdatetime-topython
-// @snippet qpoint
-namespace PySide {
- template<> inline Py_ssize_t hash(const QPoint &v) {
- return qHash(qMakePair(v.x(), v.y()));
- }
-};
-// @snippet qpoint
-
-// @snippet qrect
-namespace PySide {
- template<> inline Py_ssize_t hash(const QRect &r) {
- const int v[4] = {r.x(), r.y(), r.width(), r.height()};
- return qHashRange(v, v + 4);
- }
-};
-// @snippet qrect
-
-// @snippet qsize
-namespace PySide {
- template<> inline Py_ssize_t hash(const QSize &v) {
- return qHash(qMakePair(v.width(), v.height()));
- }
-};
-// @snippet qsize
-
// @snippet qtime-topython
if (!PyDateTimeAPI)
PyDateTime_IMPORT;
@@ -509,17 +617,20 @@ const QString result = qObjectTr(reinterpret_cast<PyTypeObject *>(%PYSELF), %1,
%PYARG_0 = %CONVERTTOPYTHON[QString](result);
// @snippet qobject-tr
-// @snippet qobject-receivers
-// Avoid return +1 because SignalManager connect to "destroyed()" signal to control object timelife
-int ret = %CPPSELF.%FUNCTION_NAME(%1);
-if (ret > 0 && ((strcmp(%1, SIGNAL(destroyed())) == 0) || (strcmp(%1, SIGNAL(destroyed(QObject*))) == 0)))
- ret -= PySide::SignalManager::instance().countConnectionsWith(%CPPSELF);
-
-%PYARG_0 = %CONVERTTOPYTHON[int](ret);
-// @snippet qobject-receivers
+// @snippet qobject-sender
+// Retrieve the sender from a dynamic property set by GlobalReceiverV2 in case of a
+// non-C++ slot (Python callback).
+auto *ret = %CPPSELF.%FUNCTION_NAME();
+if (ret == nullptr) {
+ auto senderV = %CPPSELF.property("_q_pyside_sender");
+ if (senderV.typeId() == QMetaType::QObjectStar)
+ ret = senderV.value<QObject *>();
+}
+%PYARG_0 = %CONVERTTOPYTHON[QObject*](ret);
+// @snippet qobject-sender
// @snippet qbytearray-mgetitem
-if (PepIndex_Check(_key)) {
+if (PyIndex_Check(_key)) {
const Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
if (_i < 0 || _i >= %CPPSELF.size()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
@@ -560,7 +671,8 @@ return %CONVERTTOPYTHON[QByteArray](ba);
// @snippet qbytearray-mgetitem
// @snippet qbytearray-msetitem
-if (PepIndex_Check(_key)) {
+// PYSIDE-2404: Usage of the `get()` function not necessary, the type exists.
+if (PyIndex_Check(_key)) {
Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
if (_i == -1 && PyErr_Occurred())
return -1;
@@ -584,7 +696,8 @@ if (PepIndex_Check(_key)) {
PyErr_SetString(PyExc_ValueError, "bytearray must be of size 1");
return -1;
}
- } else if (Py_TYPE(_value) == reinterpret_cast<PyTypeObject *>(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX])) {
+ } else if (Py_TYPE(_value) == reinterpret_cast<PyTypeObject *>(
+ SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX].type)) {
if (PyObject_Length(_value) != 1) {
PyErr_SetString(PyExc_ValueError, "QByteArray must be of size 1");
return -1;
@@ -621,7 +734,7 @@ if (PySlice_GetIndicesEx(_key, %CPPSELF.size(), &start, &stop, &step, &sliceleng
Py_ssize_t value_length = 0;
if (_value != nullptr && _value != Py_None) {
if (!(PyBytes_Check(_value) || PyByteArray_Check(_value)
- || Py_TYPE(_value) == reinterpret_cast<PyTypeObject *>(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX]))) {
+ || Py_TYPE(_value) == SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX].type)) {
PyErr_Format(PyExc_TypeError, "bytes, bytearray or QByteArray is required, not %.200s",
Py_TYPE(_value)->tp_name);
return -1;
@@ -672,16 +785,16 @@ static int SbkQByteArray_getbufferproc(PyObject *obj, Py_buffer *view, int flags
QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj);
//XXX /|\ omitting this space crashes shiboken!
- #ifdef Py_LIMITED_API
+#ifdef Py_LIMITED_API
view->obj = obj;
view->buf = reinterpret_cast<void *>(cppSelf->data());
view->len = cppSelf->size();
view->readonly = 0;
view->itemsize = 1;
- view->format = const_cast<char *>("c");
+ view->format = (flags & PyBUF_FORMAT) == PyBUF_FORMAT ? const_cast<char *>("B") : nullptr;
view->ndim = 1;
view->shape = (flags & PyBUF_ND) == PyBUF_ND ? &(view->len) : nullptr;
- view->strides = &view->itemsize;
+ view->strides = (flags & PyBUF_STRIDES) == PyBUF_STRIDES ? &(view->itemsize) : nullptr;
view->suboffsets = nullptr;
view->internal = nullptr;
@@ -847,6 +960,13 @@ uchar *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1));
%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(%1, %2, %3), %2, Shiboken::Buffer::ReadWrite);
// @snippet qfiledevice-map
+// @snippet qiodevice-bufferedread
+Py_ssize_t bufferLen;
+auto *data = reinterpret_cast<char*>(Shiboken::Buffer::getPointer(%PYARG_1, &bufferLen));
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(data, PyLong_AsLongLong(%PYARG_2));
+return PyLong_FromLong(%0);
+// @snippet qiodevice-bufferedread
+
// @snippet qiodevice-readdata
QByteArray ba(1 + qsizetype(%2), char(0));
%CPPSELF.%FUNCTION_NAME(ba.data(), qint64(%2));
@@ -894,63 +1014,124 @@ auto *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1, &si
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
// @snippet qtranslator-load
-// @snippet qtimer-singleshot-1
-// %FUNCTION_NAME() - disable generation of c++ function call
-(void) %2; // remove warning about unused variable
-Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
-auto *timerType = Shiboken::SbkType<QTimer>();
-auto *pyTimer = timerType->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
-timerType->tp_init(pyTimer, emptyTuple, nullptr);
-
-auto timer = %CONVERTTOCPP[QTimer *](pyTimer);
-//XXX /|\ omitting this space crashes shiboken!
-Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer, "connect", "OsOs",
- pyTimer,
- SIGNAL(timeout()),
- %PYARG_2,
- %3)
-);
-Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
-Py_XDECREF(pyTimer);
-timer->setSingleShot(true);
-timer->connect(timer, &QTimer::timeout, timer, &QObject::deleteLater);
-timer->start(%1);
-// @snippet qtimer-singleshot-1
-
-// @snippet qtimer-singleshot-2
-// %FUNCTION_NAME() - disable generation of c++ function call
+// @snippet qtimer-singleshot-functorclass
+struct QSingleShotTimerFunctor : public Shiboken::PyObjectHolder
+{
+public:
+ using Shiboken::PyObjectHolder::PyObjectHolder;
+
+ void operator()();
+};
+
+void QSingleShotTimerFunctor::operator()()
+{
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef arglist(PyTuple_New(0));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(object(), arglist));
+ release(); // single shot
+}
+// @snippet qtimer-singleshot-functorclass
+
+// @snippet qtimer-singleshot-direct-mapping
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
-auto *timerType = Shiboken::SbkType<QTimer>();
-auto *pyTimer = timerType->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
-timerType->tp_init(pyTimer, emptyTuple, nullptr);
-QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
-timer->setSingleShot(true);
-
-if (PyObject_TypeCheck(%2, PySideSignalInstance_TypeF())) {
- PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%2);
- Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance)));
- Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer, "connect", "OsOO",
- pyTimer,
- SIGNAL(timeout()),
- PySide::Signal::getObject(signalInstance),
- signalSignature.object())
- );
+%CPPSELF.%FUNCTION_NAME(%1, %2, %3);
+// @snippet qtimer-singleshot-direct-mapping
+
+// @snippet qtimer-singleshot-functor
+auto msec = %1;
+if (msec == 0) {
+ if (PyObject_TypeCheck(%2, PySideSignalInstance_TypeF())) {
+ auto *signal = %PYARG_2;
+ auto cppCallback = [signal]()
+ {
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef ret(PyObject_CallMethod(signal, "emit", "()"));
+ Py_DECREF(signal);
+ };
+
+ Py_INCREF(signal);
+ %CPPSELF.%FUNCTION_NAME(msec, cppCallback);
+ } else {
+ %CPPSELF.%FUNCTION_NAME(msec, QSingleShotTimerFunctor(%PYARG_2));
+ }
+} else {
+ // %FUNCTION_NAME() - disable generation of c++ function call
+ Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
+ auto *timerType = Shiboken::SbkType<QTimer>();
+ auto newFunc = reinterpret_cast<newfunc>(PepType_GetSlot(timerType, Py_tp_new));
+ auto initFunc = reinterpret_cast<initproc>(PepType_GetSlot(timerType, Py_tp_init));
+ auto *pyTimer = newFunc(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
+ initFunc(pyTimer, emptyTuple, nullptr);
+
+ QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
+ timer->setSingleShot(true);
+
+ if (PyObject_TypeCheck(%2, PySideSignalInstance_TypeF())) {
+ PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%2);
+ Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance)));
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer, "connect", "OsOO",
+ pyTimer,
+ SIGNAL(timeout()),
+ PySide::Signal::getObject(signalInstance),
+ signalSignature.object())
+ );
+ } else {
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer, "connect", "OsO",
+ pyTimer,
+ SIGNAL(timeout()),
+ %PYARG_2)
+ );
+ }
+
+ timer->connect(timer, &QTimer::timeout, timer, &QObject::deleteLater, Qt::DirectConnection);
+ Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
+ Py_XDECREF(pyTimer);
+ timer->start(msec);
+}
+// @snippet qtimer-singleshot-functor
+
+// @snippet qtimer-singleshot-functor-context
+auto msec = %1;
+if (msec == 0) {
+ Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
+ auto *callable = %PYARG_3;
+ auto cppCallback = [callable]()
+ {
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef arglist(PyTuple_New(0));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
+ Py_DECREF(callable);
+ };
+
+ Py_INCREF(callable);
+ %CPPSELF.%FUNCTION_NAME(msec, %2, cppCallback);
} else {
+ Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
+ auto *timerType = Shiboken::SbkType<QTimer>();
+ auto newFunc = reinterpret_cast<newfunc>(PepType_GetSlot(timerType, Py_tp_new));
+ auto initFunc = reinterpret_cast<initproc>(PepType_GetSlot(timerType, Py_tp_init));
+ auto *pyTimer = newFunc(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
+ initFunc(pyTimer, emptyTuple, nullptr);
+
+ QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
+ timer->setSingleShot(true);
+
Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer, "connect", "OsO",
+ PyObject_CallMethod(pyTimer, "connect", "OsOO",
pyTimer,
SIGNAL(timeout()),
- %PYARG_2)
+ %PYARG_2,
+ %PYARG_3)
);
-}
-timer->connect(timer, &QTimer::timeout, timer, &QObject::deleteLater, Qt::DirectConnection);
-Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
-Py_XDECREF(pyTimer);
-timer->start(%1);
-// @snippet qtimer-singleshot-2
+ timer->connect(timer, &QTimer::timeout, timer, &QObject::deleteLater, Qt::DirectConnection);
+ Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
+ Py_XDECREF(pyTimer);
+ timer->start(msec);
+}
+// @snippet qtimer-singleshot-functor-context
// @snippet qprocess-startdetached
qint64 pid;
@@ -1016,6 +1197,16 @@ if (result == -1) {
}
// @snippet qdatastream-readrawdata
+// @snippet qdatastream-writerawdata-pybuffer
+int r = 0;
+Py_ssize_t bufferLen;
+auto *data = reinterpret_cast<const char*>(Shiboken::Buffer::getPointer(%PYARG_1, &bufferLen));
+Py_BEGIN_ALLOW_THREADS
+r = %CPPSELF.%FUNCTION_NAME(data, bufferLen);
+Py_END_ALLOW_THREADS
+%PYARG_0 = %CONVERTTOPYTHON[int](r);
+// @snippet qdatastream-writerawdata-pybuffer
+
// @snippet qdatastream-writerawdata
int r = 0;
Py_BEGIN_ALLOW_THREADS
@@ -1154,7 +1345,7 @@ Py_END_ALLOW_THREADS
if (atexit.isNull()) {
qWarning("Module atexit not found for registering __moduleShutdown");
PyErr_Clear();
- }else{
+ } else {
regFunc.reset(PyObject_GetAttrString(atexit, "register"));
if (regFunc.isNull()) {
qWarning("Function atexit.register not found for registering __moduleShutdown");
@@ -1273,6 +1464,7 @@ if (PyErr_WarnEx(PyExc_DeprecationWarning,
// @snippet conversion-pyunicode
// @snippet conversion-pynone
+SBK_UNUSED(%in)
%out = %OUTTYPE();
// @snippet conversion-pynone
@@ -1291,7 +1483,7 @@ auto res = (*%CPPSELF) + cppArg0;
// @snippet conversion-pystring-char
char c = %CONVERTTOCPP[char](%in);
-%out = %OUTTYPE(c);
+%out = %OUTTYPE(static_cast<unsigned short>(c));
// @snippet conversion-pystring-char
// @snippet conversion-pyint
@@ -1325,15 +1517,23 @@ double in = %CONVERTTOCPP[double](%in);
// @snippet conversion-sbkobject
// a class supported by QVariant?
const QMetaType metaType = QVariant_resolveMetaType(Py_TYPE(%in));
+bool ok = false;
if (metaType.isValid()) {
QVariant var(metaType);
- Shiboken::Conversions::SpecificConverter converter(metaType.name());
- converter.toCpp(pyIn, var.data());
- %out = var;
-} else {
- // If the type was not encountered, return a default PyObjectWrapper
- %out = QVariant::fromValue(PySide::PyObjectWrapper(%in));
+ auto converterO = converterForQtType(metaType.name());
+ ok = converterO.has_value();
+ if (ok) {
+ converterO.value().toCpp(pyIn, var.data());
+ %out = var;
+ } else {
+ qWarning("%s: Cannot find a converter for \"%s\".",
+ __FUNCTION__, metaType.name());
+ }
}
+
+// If the type was not encountered, return a default PyObjectWrapper
+if (!ok)
+ %out = QVariant::fromValue(PySide::PyObjectWrapper(%in));
// @snippet conversion-sbkobject
// @snippet conversion-pydict
@@ -1419,10 +1619,40 @@ return PyLong_FromUnsignedLong(%in);
#endif
// @snippet return-pylong-quintptr
+// @snippet return-qfunctionpointer-pylong
+return PyLong_FromVoidPtr(reinterpret_cast<void *>(%in));
+// @snippet return-qfunctionpointer-pylong
+
+// @snippet conversion-pylong-qfunctionpointer
+%out = reinterpret_cast<QFunctionPointer>(PyLong_AsVoidPtr(%in));
+// @snippet conversion-pylong-qfunctionpointer
+
// @snippet return-pyunicode
return PySide::qStringToPyUnicode(%in);
// @snippet return-pyunicode
+// @snippet return-pyunicode-from-qlatin1string
+#ifdef Py_LIMITED_API
+return PySide::qStringToPyUnicode(QString::fromLatin1(%in));
+#else
+return PyUnicode_FromKindAndData(PyUnicode_1BYTE_KIND, %in.constData(), %in.size());
+#endif
+// @snippet return-pyunicode-from-qlatin1string
+
+// @snippet qlatin1string-check
+static bool qLatin1StringCheck(PyObject *o)
+{
+ return PyUnicode_CheckExact(o) != 0
+ && _PepUnicode_KIND(o) == PepUnicode_1BYTE_KIND;
+}
+// @snippet qlatin1string-check
+
+// @snippet conversion-pystring-qlatin1string
+const char *data = reinterpret_cast<const char *>(_PepUnicode_DATA(%in));
+const Py_ssize_t len = PyUnicode_GetLength(%in);
+%out = QLatin1String(data, len);
+// @snippet conversion-pystring-qlatin1string
+
// @snippet return-pyunicode-from-qanystringview
return PySide::qStringToPyUnicode(%in.toString());
// @snippet return-pyunicode-from-qanystringview
@@ -1461,11 +1691,10 @@ default:
break;
}
-Shiboken::Conversions::SpecificConverter converter(cppInRef.typeName());
-if (converter) {
- void *ptr = cppInRef.data();
- return converter.toPython(ptr);
-}
+auto converterO = converterForQtType(cppInRef.typeName());
+if (converterO.has_value())
+ return converterO.value().toPython(cppInRef.data());
+
PyErr_Format(PyExc_RuntimeError, "Can't find converter for '%s'.", %in.typeName());
return 0;
// @snippet return-qvariant
@@ -1482,7 +1711,6 @@ return %CONVERTTOPYTHON[QVariant](ret);
// @snippet qthread_pthread_cleanup
#ifdef Q_OS_UNIX
-# include <stdio.h>
# include <pthread.h>
static void qthread_pthread_cleanup(void *arg)
{
@@ -1509,13 +1737,17 @@ pthread_cleanup_pop(0);
// @snippet qthread_pthread_cleanup_uninstall
// @snippet qlibraryinfo_build
-#if defined(Py_LIMITED_API)
-auto suffix = PyUnicode_FromString(" [limited API]");
auto oldResult = pyResult;
-pyResult = PyUnicode_Concat(pyResult, suffix);
-Py_DECREF(oldResult);
-Py_DECREF(suffix);
+const auto version = _PepRuntimeVersion();
+pyResult = PyUnicode_FromFormat(
+#ifdef Py_LIMITED_API
+ "%U [Python limited API %d.%d.%d]",
+#else
+ "%U [Python %d.%d.%d]",
#endif
+ oldResult, (version >> 16) & 0xFF,
+ (version >> 8) & 0xFF, version & 0xFF);
+Py_DECREF(oldResult);
// @snippet qlibraryinfo_build
// @snippet qsharedmemory_data_readonly
@@ -1557,10 +1789,8 @@ QDebug(&result).nospace() << "<PySide6.QtCore.QEvent(" << %CPPSELF->type() << ")
// @snippet repr-qevent
// @snippet qmetaproperty_write_enum
-if (Shiboken::Enum::check(%PYARG_2)) {
- int in = %CONVERTTOCPP[int](%PYARG_2);
- cppArg1 = QVariant(in);
-}
+if (Shiboken::Enum::check(%PYARG_2))
+ cppArg1 = QVariant(int(Shiboken::Enum::getValue(%PYARG_2)));
// @snippet qmetaproperty_write_enum
// @snippet qdatastream-read-bytes
@@ -1578,8 +1808,9 @@ if (dataChar == nullptr) {
// @snippet qdatastream-read-bytes
// @snippet qloggingcategory_to_cpp
+// PYSIDE-2404: Usage of the `get()` function not necessary, the type exists.
QLoggingCategory *category{nullptr};
- Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypes[SBK_QLOGGINGCATEGORY_IDX],
+ Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypeStructs[SBK_QLoggingCategory_IDX].type,
pyArgs[0], &(category));
// @snippet qloggingcategory_to_cpp
@@ -1629,83 +1860,295 @@ QtCoreHelper::QGenericReturnArgumentHolder result(qArgData.metaType, qArgData.da
%PYARG_0 = %CONVERTTOPYTHON[QtCoreHelper::QGenericReturnArgumentHolder](result);
// @snippet q_return_arg
-// invokeMethod(QObject *,const char *, QGenericArgument a0, a1, a2 )
-// @snippet qmetaobject-invokemethod-arg
-const bool result = %CPPSELF.invokeMethod(%1, %2, %3, %4, %5);
-%PYARG_0 = %CONVERTTOPYTHON[bool](result);
-// @snippet qmetaobject-invokemethod-arg
+// @snippet qmetamethod-invoke-helpers
+static InvokeMetaMethodFunc
+ createInvokeMetaMethodFunc(const QMetaMethod &method, QObject *object,
+ Qt::ConnectionType type = Qt::AutoConnection)
+{
+ return [&method, object, type](QGenericArgument a0, QGenericArgument a1,
+ QGenericArgument a2, QGenericArgument a3,
+ QGenericArgument a4, QGenericArgument a5,
+ QGenericArgument a6, QGenericArgument a7,
+ QGenericArgument a8, QGenericArgument a9) -> bool
+ {
+ return method.invoke(object, type, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ };
+}
-// invokeMethod(QObject *,const char *,Qt::ConnectionType, QGenericArgument a0, a1, a2 )
-// @snippet qmetaobject-invokemethod-conn-type-arg
-qDebug() << __FUNCTION__ << %2;
-const bool result = %CPPSELF.invokeMethod(%1, %2, %3, %4, %5, %6);
-%PYARG_0 = %CONVERTTOPYTHON[bool](result);
-// @snippet qmetaobject-invokemethod-conn-type-arg
+static InvokeMetaMethodFuncWithReturn
+ createInvokeMetaMethodFuncWithReturn(const QMetaMethod &method, QObject *object,
+ Qt::ConnectionType type = Qt::AutoConnection)
+{
+ return [&method, object, type](QGenericReturnArgument r,
+ QGenericArgument a0, QGenericArgument a1,
+ QGenericArgument a2, QGenericArgument a3,
+ QGenericArgument a4, QGenericArgument a5,
+ QGenericArgument a6, QGenericArgument a7,
+ QGenericArgument a8, QGenericArgument a9) -> bool
+ {
+ return method.invoke(object, type, r, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ };
+}
+// @snippet qmetamethod-invoke-helpers
-// @snippet qmetaobject-invokemethod-helpers
-static PyObject *invokeMethodHelper(QObject *obj, const char *member, Qt::ConnectionType type,
- const QtCoreHelper::QGenericReturnArgumentHolder &returnArg,
- const QtCoreHelper::QGenericArgumentHolder &v1,
- const QtCoreHelper::QGenericArgumentHolder &v2,
- const QtCoreHelper::QGenericArgumentHolder &v3)
+// @snippet qmetamethod-invoke-conn-type-return-arg
+%PYARG_0 = invokeMetaMethodWithReturn(createInvokeMetaMethodFuncWithReturn(*%CPPSELF, %1, %2),
+ %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13);
+// @snippet qmetamethod-invoke-conn-type-return-arg
+
+// @snippet qmetamethod-invoke-return-arg
+%PYARG_0 = invokeMetaMethodWithReturn(createInvokeMetaMethodFuncWithReturn(*%CPPSELF, %1),
+ %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12);
+// @snippet qmetamethod-invoke-return-arg
+
+// @snippet qmetamethod-invoke-conn-type
+%PYARG_0 = invokeMetaMethod(createInvokeMetaMethodFunc(*%CPPSELF, %1, %2),
+ %3, %4, %5, %6, %7, %8, %9, %10, %11, %12);
+// @snippet qmetamethod-invoke-conn-type
+
+// @snippet qmetamethod-invoke
+%PYARG_0 = invokeMetaMethod(createInvokeMetaMethodFunc(*%CPPSELF, %1),
+ %2, %3, %4, %5, %6, %7, %8, %9, %10, %11);
+// @snippet qmetamethod-invoke
+// @snippet qmetaobject-invokemethod-helpers
+static InvokeMetaMethodFunc
+ createInvokeMetaMethodFunc(QObject *object, const char *methodName,
+ Qt::ConnectionType type = Qt::AutoConnection)
{
- const bool callResult = QMetaObject::invokeMethod(obj, member, type,
- returnArg, v1, v2, v3);
- if (!callResult) {
- PyErr_Format(PyExc_RuntimeError, "QMetaObject::invokeMethod(): Invocation of %s::%s() failed.",
- obj->metaObject()->className(), member);
- return nullptr;
- }
+ return [object, methodName, type](QGenericArgument a0, QGenericArgument a1,
+ QGenericArgument a2, QGenericArgument a3,
+ QGenericArgument a4, QGenericArgument a5,
+ QGenericArgument a6, QGenericArgument a7,
+ QGenericArgument a8, QGenericArgument a9) -> bool
+ {
+ return QMetaObject::invokeMethod(object, methodName, type,
+ a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ };
+}
- PyObject *result = nullptr;
- const void *retData = returnArg.data();
- const QMetaType metaType = returnArg.metaType();
- switch (metaType.id()) {
- case QMetaType::Bool:
- result = *reinterpret_cast<const bool *>(retData) ? Py_True : Py_False;
- Py_INCREF(result);
- break;
- case QMetaType::Int:
- result = PyLong_FromLong(*reinterpret_cast<const int *>(retData));
- break;
- case QMetaType::Double:
- result = PyFloat_FromDouble(*reinterpret_cast<const double *>(retData));
- break;
- case QMetaType::QString:
- result = PySide::qStringToPyUnicode(*reinterpret_cast<const QString *>(retData));
- break;
- default: {
- Shiboken::Conversions::SpecificConverter converter(metaType.name());
- const auto type = converter.conversionType();
- if (type == Shiboken::Conversions::SpecificConverter::InvalidConversion) {
- PyErr_Format(PyExc_RuntimeError, "%s: Unable to find converter for \"%s\".",
- __FUNCTION__, metaType.name());
- return nullptr;
- }
- result = converter.toPython(retData);
- }
- }
- return result;
+static InvokeMetaMethodFuncWithReturn
+ createInvokeMetaMethodFuncWithReturn(QObject *object, const char *methodName,
+ Qt::ConnectionType type = Qt::AutoConnection)
+{
+ return [object, methodName, type](QGenericReturnArgument r,
+ QGenericArgument a0, QGenericArgument a1,
+ QGenericArgument a2, QGenericArgument a3,
+ QGenericArgument a4, QGenericArgument a5,
+ QGenericArgument a6, QGenericArgument a7,
+ QGenericArgument a8, QGenericArgument a9) -> bool
+ {
+ return QMetaObject::invokeMethod(object, methodName, type,
+ r, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
+ };
}
// @snippet qmetaobject-invokemethod-helpers
+// invokeMethod(QObject *,const char *, QGenericArgument a0, a1, a2 )
+// @snippet qmetaobject-invokemethod-arg
+%PYARG_0 = invokeMetaMethod(createInvokeMetaMethodFunc(%1, %2),
+ %3, %4, %5, %6, %7, %8, %9, %10, %11, %12);
+// @snippet qmetaobject-invokemethod-arg
+
+// invokeMethod(QObject *,const char *,Qt::ConnectionType, QGenericArgument a0, a1, a2 )
+// @snippet qmetaobject-invokemethod-conn-type-arg
+%PYARG_0 = invokeMetaMethod(createInvokeMetaMethodFunc(%1, %2, %3),
+ %4, %5, %6, %7, %8, %9, %10, %11, %12, %13);
+// @snippet qmetaobject-invokemethod-conn-type-arg
+
// invokeMethod(QObject *,const char *, Qt::ConnectionType, QGenericReturnArgument,QGenericArgument a0, a1, a2 )
// @snippet qmetaobject-invokemethod-conn-type-return-arg
-%PYARG_0 = invokeMethodHelper(%1, %2, %3, %4, %5, %6, %7);
+%PYARG_0 = invokeMetaMethodWithReturn(createInvokeMetaMethodFuncWithReturn(%1, %2, %3),
+ %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14);
// @snippet qmetaobject-invokemethod-conn-type-return-arg
// invokeMethod(QObject *,const char *, QGenericReturnArgument,QGenericArgument a0, a1, a2 )
// @snippet qmetaobject-invokemethod-return-arg
-%PYARG_0 = invokeMethodHelper(%1, %2, Qt::AutoConnection, %3, %4, %5, %6);
+%PYARG_0 = invokeMetaMethodWithReturn(createInvokeMetaMethodFuncWithReturn(%1, %2),
+ %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13);
// @snippet qmetaobject-invokemethod-return-arg
-// @snippet qabstractitemmodel_data
-::QVariant %0 ;
-if (Shiboken::Enum::check(%PYARG_0)) {
- int in = %CONVERTTOCPP[int](%PYARG_0);
- %0 = QVariant(in);
+// @snippet keycombination-from-keycombination
+cptr = new ::%TYPE(%1);
+// @snippet keycombination-from-keycombination
+
+// @snippet keycombination-from-modifier
+cptr = new ::%TYPE(%1, %2);
+// @snippet keycombination-from-modifier
+
+// @snippet qmetamethod-from-signal
+auto *signalInst = reinterpret_cast<PySideSignalInstance *>(%PYARG_1);
+const auto data = PySide::Signal::getEmitterData(signalInst);
+const auto result = data.methodIndex != -1
+ ? data.emitter->metaObject()->method(data.methodIndex)
+ : QMetaMethod{};
+%PYARG_0 = %CONVERTTOPYTHON[QMetaMethod](result);
+// @snippet qmetamethod-from-signal
+
+// @snippet qrunnable_create
+auto callable = %PYARG_1;
+auto callback = [callable]() -> void
+{
+ if (!PyCallable_Check(callable)) {
+ qWarning("Argument 1 of %FUNCTION_NAME must be a callable.");
+ return;
+ }
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef ret(PyObject_CallObject(callable, nullptr));
+ Py_DECREF(callable);
+};
+Py_INCREF(callable);
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(callback);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qrunnable_create
+
+// @snippet qlocale_system
+// For darwin systems, QLocale::system() involves looking at the Info.plist of the application
+// bundle to detect the system localization. In the case of Qt for Python, the application bundle
+// is the used Python framework. To enable retreival of localized string, the property list key
+// CFBunldeAllowMixedLocalizations should be set to True inside the Info.plist file. Otherwise,
+// CFBundleDevelopmentRegion will be used to find the language preference of the user, which in the
+// case of Python is always english.
+// This is a hack until CFBunldeAllowMixedLocalizations will be set in the Python framework
+// installation in darwin systems.
+// Upstream issue in CPython: https://github.com/python/cpython/issues/108269
+#ifdef Q_OS_DARWIN
+ Shiboken::AutoDecRef locale(PyImport_ImportModule("locale"));
+ Shiboken::AutoDecRef getLocale(PyObject_GetAttrString(locale, "getlocale"));
+ Shiboken::AutoDecRef systemLocale(PyObject_CallObject(getLocale, nullptr));
+ PyObject* localeCode = PyTuple_GetItem(systemLocale, 0);
+ %RETURN_TYPE %0;
+ if (localeCode != Py_None) {
+ QString localeCodeStr = PySide::pyStringToQString(localeCode);
+ %0 = QLocale(localeCodeStr);
+ } else {
+ // The default locale is 'C' locale as mentioned in
+ // https://docs.python.org/3/library/locale.html
+ %0 = ::QLocale::c();
+ }
+#else
+ %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME();
+#endif
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qlocale_system
+
+// @snippet qcoreapplication-requestpermission
+auto permission = %1;
+auto callable = %PYARG_3;
+
+// check if callable
+if (!PyCallable_Check(callable)) {
+ qWarning("Functor of %FUNCTION_NAME is not a callable");
+ return {};
+}
+
+// find the number of arguments of callable. It should either be empy or accept a QPermission
+// object
+int count = 0;
+PyObject* fc = nullptr;
+bool classMethod = false;
+Shiboken::AutoDecRef func_ob(PyObject_GetAttr(callable, Shiboken::PyMagicName::func()));
+
+if (func_ob.isNull() && PyObject_HasAttr(callable, Shiboken::PyMagicName::code())) {
+ // variable `callable` is a function
+ fc = PyObject_GetAttr(callable, Shiboken::PyMagicName::code());
} else {
- pythonToCpp(pyResult, &cppResult);
+ // variable `callable` is a class method
+ fc = PyObject_GetAttr(func_ob, Shiboken::PyMagicName::code());
+ classMethod = true;
}
-// @snippet qabstractitemmodel_data
+
+if (fc) {
+ PyObject* ac = PyObject_GetAttrString(fc, "co_argcount");
+ if (ac) {
+ count = PyLong_AsLong(ac);
+ Py_DECREF(ac);
+ }
+ Py_DECREF(fc);
+}
+
+if ((classMethod && (count > 2)) || (!classMethod && (count > 1))) {
+ qWarning("Functor of %FUNCTION_NAME must either have QPermission object as argument or none."
+ "The QPermission object store the result of requestPermission()");
+ return {};
+}
+
+bool arg_qpermission = (classMethod && (count == 2)) || (!classMethod && (count == 1));
+
+auto callback = [callable, count, arg_qpermission](const QPermission &permission) -> void
+{
+ Shiboken::GilState state;
+ if (arg_qpermission) {
+ Shiboken::AutoDecRef arglist(PyTuple_New(1));
+ PyTuple_SET_ITEM(arglist.object(), 0, %CONVERTTOPYTHON[QPermission](permission));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
+ } else {
+ Shiboken::AutoDecRef ret(PyObject_CallObject(callable, nullptr));
+ }
+ Py_DECREF(callable);
+};
+Py_INCREF(callable);
+
+Py_BEGIN_ALLOW_THREADS
+%CPPSELF.%FUNCTION_NAME(permission, %2, callback);
+Py_END_ALLOW_THREADS
+// @snippet qcoreapplication-requestpermission
+
+// @snippet qlockfile-getlockinfo
+qint64 pid{};
+QString hostname, appname;
+%CPPSELF.%FUNCTION_NAME(&pid, &hostname, &appname);
+%PYARG_0 = PyTuple_New(3);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[qint64](pid));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](hostname));
+PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[QString](appname));
+// @snippet qlockfile-getlockinfo
+
+// @snippet darwin_permission_plugin
+#ifdef Q_OS_DARWIN
+#include<QtCore/qplugin.h>
+// register the static plugin and setup its metadata
+Q_IMPORT_PLUGIN(QDarwinCameraPermissionPlugin)
+Q_IMPORT_PLUGIN(QDarwinMicrophonePermissionPlugin)
+Q_IMPORT_PLUGIN(QDarwinBluetoothPermissionPlugin)
+Q_IMPORT_PLUGIN(QDarwinContactsPermissionPlugin)
+Q_IMPORT_PLUGIN(QDarwinCalendarPermissionPlugin)
+#endif
+// @snippet darwin_permission_plugin
+
+// @snippet qt-modifier
+PyObject *_inputDict = PyDict_New();
+// Note: The builtins line is no longer needed since Python 3.10. Undocumented!
+PyDict_SetItemString(_inputDict, "__builtins__", PyEval_GetBuiltins());
+PyDict_SetItemString(_inputDict, "QtCore", module);
+PyDict_SetItemString(_inputDict, "Qt", reinterpret_cast<PyObject *>(pyType));
+// Explicitly not dereferencing the result.
+PyRun_String(R"PY(if True:
+ from enum import Flag
+ from textwrap import dedent
+ from warnings import warn
+ # QtCore and Qt come as globals.
+
+ def func_or(self, other):
+ if isinstance(self, Flag) and isinstance(other, Flag):
+ # this is normal or-ing flags together
+ return Qt.KeyboardModifier(self.value | other.value)
+ return QtCore.QKeyCombination(self, other)
+
+ def func_add(self, other):
+ warn(dedent(f"""
+ The "+" operator is deprecated in Qt For Python 6.0 .
+ Please use "|" instead."""), stacklevel=2)
+ return func_or(self, other)
+
+ Qt.KeyboardModifier.__or__ = func_or
+ Qt.KeyboardModifier.__ror__ = func_or
+ Qt.Modifier.__or__ = func_or
+ Qt.Modifier.__ror__ = func_or
+ Qt.KeyboardModifier.__add__ = func_add
+ Qt.KeyboardModifier.__radd__ = func_add
+ Qt.Modifier.__add__ = func_add
+ Qt.Modifier.__radd__ = func_add
+
+)PY", Py_file_input, _inputDict, _inputDict);
+// @snippet qt-modifier
diff --git a/sources/pyside6/PySide6/glue/qtdatavisualization.cpp b/sources/pyside6/PySide6/glue/qtdatavisualization.cpp
index add759f05..3a179cb17 100644
--- a/sources/pyside6/PySide6/glue/qtdatavisualization.cpp
+++ b/sources/pyside6/PySide6/glue/qtdatavisualization.cpp
@@ -41,14 +41,50 @@ using ListType = decltype(%2);
using ListType = decltype(%2);
%CPPSELF.setRow(%1, new ListType(%2), %3);
// @snippet dataproxy-setrow-string
-//
+
// @snippet dataproxy-resetarray
using ListType = decltype(%1);
%CPPSELF.resetArray(new ListType(%1));
// @snippet dataproxy-resetarray
+// @snippet dataproxy-resetarray2
+using ListType = decltype(%1);
+%CPPSELF.resetArray(new ListType(%1), %2, %3);
+// @snippet dataproxy-resetarray2
+
+// @snippet scatterdataproxy-resetarray
+%CPPSELF.resetArray(new QScatterDataArray(*%1));
+// @snippet scatterdataproxy-resetarray
+
// @snippet qsurfacedataproxy-resetarraynp
auto *data = QtDataVisualizationHelper::surfaceDataFromNp(%1, %2, %3, %4, %5);
// %CPPSELF.%FUNCTION_NAME
%CPPSELF.resetArray(data);
// @snippet qsurfacedataproxy-resetarraynp
+
+// @snippet qvalue3daxisformatter-friend
+class QFriendlyValue3DAxisFormatter : public QValue3DAxisFormatter
+{
+public:
+using QValue3DAxisFormatter::gridPositions;
+using QValue3DAxisFormatter::labelPositions;
+using QValue3DAxisFormatter::labelStrings;
+};
+
+static inline QFriendlyValue3DAxisFormatter *friendlyFormatter(QValue3DAxisFormatter *f)
+{
+ return static_cast<QFriendlyValue3DAxisFormatter *>(f);
+}
+// @snippet qvalue3daxisformatter-friend
+
+// @snippet qvalue3daxisformatter-setgridpositions
+friendlyFormatter(%CPPSELF)->gridPositions() = %1;
+// @snippet qvalue3daxisformatter-setgridpositions
+
+// @snippet qvalue3daxisformatter-setlabelpositions
+friendlyFormatter(%CPPSELF)->labelPositions() = %1;
+// @snippet qvalue3daxisformatter-setlabelpositions
+
+// @snippet qvalue3daxisformatter-setlabelstrings
+friendlyFormatter(%CPPSELF)->labelStrings() = %1;
+// @snippet qvalue3daxisformatter-setlabelstrings
diff --git a/sources/pyside6/PySide6/glue/qtgraphs.cpp b/sources/pyside6/PySide6/glue/qtgraphs.cpp
new file mode 100644
index 000000000..b5a5db799
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtgraphs.cpp
@@ -0,0 +1,8 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+// @snippet graphs-qsurfacedataproxy-resetarraynp
+auto data = QtGraphsHelper::surfaceDataFromNp(%1, %2, %3, %4, %5);
+// %CPPSELF.%FUNCTION_NAME
+%CPPSELF.resetArray(data);
+// @snippet graphs-qsurfacedataproxy-resetarraynp
diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index c6470fe75..130de11bb 100644
--- a/sources/pyside6/PySide6/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
@@ -5,6 +5,12 @@
* INJECT CODE
********************************************************************/
+// @snippet gui-declarations
+QT_BEGIN_NAMESPACE
+void qt_set_sequence_auto_mnemonic(bool);
+QT_END_NAMESPACE
+// @snippet gui-declarations
+
// @snippet qaccessible-pysidefactory
// Helper for QAccessible::installFactory() that forwards the calls to
// Python callables.
@@ -106,6 +112,134 @@ QObject *object = %CPPSELF->menu<QObject *>();
%PYARG_0 = %CONVERTTOPYTHON[QObject*](object);
// @snippet qaction-menu
+// @snippet qopenglfunctions-glgetv-return-size
+// Return the number of return values of the glGetBoolean/Double/Integerv functions
+// cf https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGet.xhtml
+static int glGetVReturnSize(GLenum pname)
+{
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_DEPTH_RANGE:
+ case GL_MAX_VIEWPORT_DIMS:
+#if !QT_CONFIG(opengles2)
+ case GL_POINT_SIZE_RANGE:
+ case GL_SMOOTH_LINE_WIDTH_RANGE:
+ case GL_VIEWPORT_BOUNDS_RANGE:
+#endif
+ return 2;
+ case GL_BLEND_COLOR:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ return 4;
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ return GL_NUM_COMPRESSED_TEXTURE_FORMATS;
+ default:
+ break;
+ }
+ return 1;
+}
+// @snippet qopenglfunctions-glgetv-return-size
+
+// @snippet qopenglextrafunctions-glgeti-v-return-size
+// Return the number of return values of the indexed
+// glGetBoolean/Double/Integeri_v functions
+// cf https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGet.xhtml
+static int glGetI_VReturnSize(GLenum pname)
+{
+ return pname == GL_VIEWPORT ? 4 : 1;
+}
+// @snippet qopenglextrafunctions-glgeti-v-return-size
+
+// @snippet qopenglfunctions-glgetbooleanv
+const int size = glGetVReturnSize(%1);
+QVarLengthArray<GLboolean> result(size, GL_FALSE);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[bool](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createByteArray1(size, result.constData());
+}
+// @snippet qopenglfunctions-glgetbooleanv
+
+// @snippet qopenglfunctions-glgetdoublev
+const int size = glGetVReturnSize(%1);
+QVarLengthArray<GLdouble> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[double](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createDoubleArray1(size, result.constData());
+}
+// @snippet qopenglfunctions-glgetdoublev
+
+// @snippet qopenglfunctions-glgetfloatv
+const int size = glGetVReturnSize(%1);
+QVarLengthArray<GLfloat> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[float](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createFloatArray1(size, result.constData());
+}
+// @snippet qopenglfunctions-glgetfloatv
+
+// @snippet qopenglfunctions-glgetintegerv
+const int size = glGetVReturnSize(%1);
+QVarLengthArray<GLint> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[int](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createIntArray1(size, result.constData());
+}
+// @snippet qopenglfunctions-glgetintegerv
+
+// @snippet qopenglextrafunctions-glgetbooleani-v
+const int size = glGetI_VReturnSize(%1);
+QVarLengthArray<GLboolean> result(size, GL_FALSE);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[bool](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createByteArray1(size, result.constData());
+}
+// @snippet qopenglextrafunctions-glgetbooleani-v
+
+// @snippet qopenglextrafunctions-glgetdoublei-v
+const int size = glGetI_VReturnSize(%1);
+QVarLengthArray<GLdouble> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[double](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createDoubleArray1(size, result.constData());
+}
+// @snippet qopenglextrafunctions-glgetdoublei-v
+
+// @snippet qopenglextrafunctions-glgetfloati-v
+const int size = glGetI_VReturnSize(%1);
+QVarLengthArray<GLfloat> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[float](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createFloatArray1(size, result.constData());
+}
+// @snippet qopenglextrafunctions-glgetfloati-v
+
+// @snippet qopenglextrafunctions-glgetintegeri-v
+const int size = glGetI_VReturnSize(%1);
+QVarLengthArray<GLint> result(size, 0);
+%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, result.data());
+if (size == 1) {
+ %PYARG_0 = %CONVERTTOPYTHON[int](result[0]);
+} else {
+ %PYARG_0 = Shiboken::Numpy::createIntArray1(size, result.constData());
+}
+// @snippet qopenglextrafunctions-glgetintegeri-v
+
// @snippet glgetshadersource
GLsizei bufSize = 4096;
GLsizei length = bufSize - 1;
@@ -180,10 +314,19 @@ if (_i < 0 || _i >= %CPPSELF.count()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
-int item = (*%CPPSELF)[_i];
-return %CONVERTTOPYTHON[int](item);
+QKeyCombination item = (*%CPPSELF)[_i];
+return %CONVERTTOPYTHON[QKeyCombination](item);
// @snippet qkeysequence-getitem
+// @snippet qkeysequence-repr
+auto ObTuple_Type = reinterpret_cast<PyObject *>(&PyTuple_Type);
+auto ObSelf_Type = reinterpret_cast<PyObject *>(Py_TYPE(%PYSELF));
+Shiboken::AutoDecRef surrogate(PyObject_CallFunctionObjArgs(ObTuple_Type, %PYSELF, nullptr));
+Shiboken::AutoDecRef argstr(PyObject_Repr(surrogate));
+Shiboken::AutoDecRef name(PyObject_GetAttrString(ObSelf_Type, "__name__"));
+return PyUnicode_Concat(name, argstr);
+// @snippet qkeysequence-repr
+
// @snippet qpicture-data
%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.data(), %CPPSELF.size());
// @snippet qpicture-data
@@ -230,6 +373,16 @@ const auto path = PySide::pyPathToQString(%PYARG_1);
%CPPSELF->addPixmap(path);
// @snippet qicon-addpixmap
+// @snippet qclipboard-setpixmap
+const auto path = PySide::pyPathToQString(%PYARG_1);
+%CPPSELF->setPixmap(QPixmap(path));
+// @snippet qclipboard-setpixmap
+
+// @snippet qclipboard-setimage
+const auto path = PySide::pyPathToQString(%PYARG_1);
+%CPPSELF->setImage(QImage(path));
+// @snippet qclipboard-setimage
+
// @snippet qimage-decref-image-data
static void imageDecrefDataHandler(void *data)
{
@@ -630,12 +783,45 @@ auto *cppResult = new QtGuiHelper::QOverrideCursorGuard();
Shiboken::Object::getOwnership(%PYARG_0); // Ensure the guard is removed
// @snippet qguiapplication-setoverridecursor
+// @snippet qguiapplication-nativeInterface
+bool hasNativeApp = false;
+#if QT_CONFIG(xcb)
+if (auto *x11App = %CPPSELF.nativeInterface<QNativeInterface::QX11Application>()) {
+ hasNativeApp = true;
+ %PYARG_0 = %CONVERTTOPYTHON[QNativeInterface::QX11Application*](x11App);
+}
+#endif
+if (!hasNativeApp) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+}
+// @snippet qguiapplication-nativeInterface
+
// @snippet qscreen-grabWindow
WId id = %1;
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(id, %2, %3, %4, %5);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](retval);
// @snippet qscreen-grabWindow
+// @snippet qscreen-nativeInterface
+bool hasNativeScreen = false;
+#ifdef Q_OS_WIN
+if (auto *winScreen = %CPPSELF.nativeInterface<QNativeInterface::QWindowsScreen>()) {
+ hasNativeScreen = true;
+ %PYARG_0 = %CONVERTTOPYTHON[QNativeInterface::QWindowsScreen*](winScreen);
+}
+#endif
+if (!hasNativeScreen) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+}
+// @snippet qscreen-nativeInterface
+
+// @snippet qx11application-resource-ptr
+ auto *resource = %CPPSELF.%FUNCTION_NAME();
+%PYARG_0 = PyLong_FromVoidPtr(resource);
+// @snippet qx11application-resource-ptr
+
// @snippet qwindow-fromWinId
WId id = %1;
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(id);
@@ -703,6 +889,24 @@ else
%PYARG_0 = %CONVERTTOPYTHON[int](cppResult);
// @snippet qdrag-exec-arg2
+// @snippet qquaternion-getaxisandangle-vector3d-float
+QVector3D outVec{};
+float angle{};
+%CPPSELF.%FUNCTION_NAME(&outVec, &angle);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QVector3D](outVec));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[float](angle));
+// @snippet qquaternion-getaxisandangle-vector3d-float
+
+// @snippet qquaternion-geteulerangles
+float pitch{}, yaw{}, roll{};
+%CPPSELF.%FUNCTION_NAME(&pitch, &yaw, &roll);
+%PYARG_0 = PyTuple_New(3);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[float](pitch));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[float](yaw));
+PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[float](roll));
+// @snippet qquaternion-geteulerangles
+
// @snippet qregion-len
return %CPPSELF.rectCount();
// @snippet qregion-len
@@ -717,6 +921,17 @@ const QRect cppResult = *(%CPPSELF.cbegin() + _i);
return %CONVERTTOPYTHON[QRect](cppResult);
// @snippet qregion-getitem
+// Some RHI functions take a std::initializer_list<>. Add functions
+// to convert from list.
+
+// @snippet qrhi-initializer-list
+%CPPSELF.%FUNCTION_NAME(%1.cbegin(), %1.cend());
+// @snippet qrhi-initializer-list
+
+// @snippet qrhi-commandbuffer-setvertexinput
+%CPPSELF.%FUNCTION_NAME(%1, %2.size(), %2.constData(), %3, %4, %5);
+// @snippet qrhi-commandbuffer-setvertexinput
+
/*********************************************************************
* CONVERSIONS
********************************************************************/
diff --git a/sources/pyside6/PySide6/glue/qtmultimedia.cpp b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
index 3d46619fd..ac8434b97 100644
--- a/sources/pyside6/PySide6/glue/qtmultimedia.cpp
+++ b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// @snippet qvideoframe-bits
+#include "object.h"
%BEGIN_ALLOW_THREADS
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1);
%END_ALLOW_THREADS
@@ -20,3 +21,8 @@ const unsigned char *data = %CPPSELF.%FUNCTION_NAME<unsigned char>();
const auto size = %CPPSELF.byteCount();
%PYARG_0 = Shiboken::Buffer::newObject(data, size);
// @snippet qaudiobuffer-const-data
+
+// @snippet qtaudio-namespace-compatibility-alias
+Py_INCREF(pyType);
+PyModule_AddObject(module, "QtAudio", reinterpret_cast<PyObject *>(pyType));
+// @snippet qtaudio-namespace-compatibility-alias
diff --git a/sources/pyside6/PySide6/glue/qtnetwork.cpp b/sources/pyside6/PySide6/glue/qtnetwork.cpp
index f00780b40..f635f4671 100644
--- a/sources/pyside6/PySide6/glue/qtnetwork.cpp
+++ b/sources/pyside6/PySide6/glue/qtnetwork.cpp
@@ -15,20 +15,28 @@ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QHostAddress](ha));
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[quint16](port));
// @snippet qudpsocket-readdatagram
-// @snippet qhostinfo-lookuphost-callable
-auto *callable = %PYARG_2;
-auto cppCallback = [callable](const QHostInfo &hostInfo)
+// @snippet qhostinfo-lookuphost-functor
+struct QHostInfoFunctor : public Shiboken::PyObjectHolder
+{
+public:
+ using Shiboken::PyObjectHolder::PyObjectHolder;
+
+ void operator()(const QHostInfo &hostInfo);
+};
+
+void QHostInfoFunctor::operator()(const QHostInfo &hostInfo)
{
Shiboken::GilState state;
Shiboken::AutoDecRef arglist(PyTuple_New(1));
auto *pyHostInfo = %CONVERTTOPYTHON[QHostInfo](hostInfo);
PyTuple_SET_ITEM(arglist.object(), 0, pyHostInfo);
- Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
- Py_DECREF(callable);
-};
+ Shiboken::AutoDecRef ret(PyObject_CallObject(object(), arglist));
+ release(); // single shot
+}
+// @snippet qhostinfo-lookuphost-functor
-Py_INCREF(callable);
-%CPPSELF.%FUNCTION_NAME(%1, cppCallback);
+// @snippet qhostinfo-lookuphost-callable
+%CPPSELF.%FUNCTION_NAME(%1, QHostInfoFunctor(%PYARG_2));
// @snippet qhostinfo-lookuphost-callable
// @snippet qipv6address-len
@@ -58,3 +66,65 @@ quint8 item = %CONVERTTOCPP[quint8](_value);
%CPPSELF.c[_i] = item;
return 0;
// @snippet qipv6address-setitem
+
+// @snippet qrestaccessmanager-functor
+class QRestFunctor
+{
+public:
+ explicit QRestFunctor(PyObject *callable) noexcept : m_callable(callable)
+ {
+ Py_INCREF(callable);
+ }
+
+ void operator()(QRestReply &restReply);
+
+private:
+ PyObject *m_callable;
+};
+
+void QRestFunctor::operator()(QRestReply &restReply)
+{
+ Q_ASSERT(m_callable);
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef arglist(PyTuple_New(1));
+ auto *restReplyPtr = &restReply;
+ auto *pyRestReply = %CONVERTTOPYTHON[QRestReply*](restReplyPtr);
+ PyTuple_SET_ITEM(arglist.object(), 0, pyRestReply);
+ Shiboken::AutoDecRef ret(PyObject_CallObject(m_callable, arglist));
+ Py_DECREF(m_callable);
+ m_callable = nullptr;
+}
+// @snippet qrestaccessmanager-functor
+
+// @snippet qrestaccessmanager-callback
+auto *networkReply = %CPPSELF.%FUNCTION_NAME(%1, %2, QRestFunctor(%PYARG_3));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](networkReply);
+// @snippet qrestaccessmanager-callback
+
+// @snippet qrestaccessmanager-data-callback
+auto *networkReply = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, QRestFunctor(%PYARG_4));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](networkReply);
+// @snippet qrestaccessmanager-data-callback
+
+// @snippet qrestaccessmanager-method-data-callback
+auto *networkReply = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, QRestFunctor(%PYARG_5));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](networkReply);
+// @snippet qrestaccessmanager-method-data-callback
+
+// @snippet qrestreply-readjson
+QJsonParseError jsonParseError;
+std::optional<QJsonDocument> documentOptional = %CPPSELF.%FUNCTION_NAME(&jsonParseError);
+
+PyObject *pyDocument{};
+if (documentOptional.has_value()) {
+ const auto &document = documentOptional.value();
+ pyDocument = %CONVERTTOPYTHON[QJsonDocument](document);
+} else {
+ pyDocument = Py_None;
+ Py_INCREF(Py_None);
+}
+
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SetItem(%PYARG_0, 0, pyDocument);
+PyTuple_SetItem(%PYARG_0, 1, %CONVERTTOPYTHON[QJsonParseError](jsonParseError));
+// @snippet qrestreply-readjson
diff --git a/sources/pyside6/PySide6/glue/qtnetworkauth.cpp b/sources/pyside6/PySide6/glue/qtnetworkauth.cpp
index e22569e2e..7877a8dd5 100644
--- a/sources/pyside6/PySide6/glue/qtnetworkauth.cpp
+++ b/sources/pyside6/PySide6/glue/qtnetworkauth.cpp
@@ -1,12 +1,21 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-// @snippet qabstractoauth-setmodifyparametersfunction
-auto callable = %PYARG_1;
-auto callback = [callable](QAbstractOAuth::Stage stage, QMultiMap<QString, QVariant>* dictPointer) -> void
+// @snippet qabstractoauth-lookuphost-functor
+struct QAbstractOAuthModifyFunctor : public Shiboken::PyObjectHolder
+{
+public:
+ using Shiboken::PyObjectHolder::PyObjectHolder;
+
+ void operator()(QAbstractOAuth::Stage stage, QMultiMap<QString, QVariant>* dictPointer);
+};
+
+void QAbstractOAuthModifyFunctor::operator()(QAbstractOAuth::Stage stage,
+ QMultiMap<QString, QVariant>* dictPointer)
{
+ auto *callable = object();
if (!PyCallable_Check(callable)) {
- qWarning("Argument 1 of %FUNCTION_NAME must be a callable.");
+ qWarning("Argument 1 of setModifyParametersFunction() must be a callable.");
return;
}
Shiboken::GilState state;
@@ -16,20 +25,20 @@ auto callback = [callable](QAbstractOAuth::Stage stage, QMultiMap<QString, QVari
PyTuple_SET_ITEM(arglist, 1, %CONVERTTOPYTHON[QMultiMap<QString, QVariant>](dict));
Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
- PyObject *key;
- PyObject *value;
- Py_ssize_t pos = 0;
- while (PyDict_Next(ret, &pos, &key, &value)) {
- QString cppKey = %CONVERTTOCPP[QString](key);
- QVariant cppValue = %CONVERTTOCPP[QVariant](value);
- dictPointer->replace(cppKey, cppValue);
+ if (!ret.isNull() && PyDict_Check(ret.object()) != 0) {
+ PyObject *key{};
+ PyObject *value{};
+ Py_ssize_t pos = 0;
+ while (PyDict_Next(ret.object(), &pos, &key, &value)) {
+ QString cppKey = %CONVERTTOCPP[QString](key);
+ QVariant cppValue = %CONVERTTOCPP[QVariant](value);
+ dictPointer->replace(cppKey, cppValue);
+ }
}
+}
+// @snippet qabstractoauth-lookuphost-functor
- Py_DECREF(callable);
- return;
-
-};
-Py_INCREF(callable);
-%CPPSELF.%FUNCTION_NAME(callback);
+// @snippet qabstractoauth-setmodifyparametersfunction
+%CPPSELF.%FUNCTION_NAME(QAbstractOAuthModifyFunctor(%PYARG_1));
// @snippet qabstractoauth-setmodifyparametersfunction
diff --git a/sources/pyside6/PySide6/glue/qtopengl.cpp b/sources/pyside6/PySide6/glue/qtopengl.cpp
index 2e93ddda7..cdfaafb3b 100644
--- a/sources/pyside6/PySide6/glue/qtopengl.cpp
+++ b/sources/pyside6/PySide6/glue/qtopengl.cpp
@@ -71,3 +71,19 @@ if (auto *f = dynamic_cast<QOpenGLFunctions_4_5_Core *>(af)) {
}
// @snippet qopenglversionfunctionsfactory-get
+// @snippet glgetvreturnsize_declaration
+int glGetVReturnSize(GLenum pname);
+// @snippet glgetvreturnsize_declaration
+
+// @snippet glgeti-vreturnsize_declaration
+int glGetI_VReturnSize(GLenum pname);
+// @snippet glgeti-vreturnsize_declaration
+
+// @snippet vao-binder-enter
+Py_INCREF(%PYSELF);
+pyResult = %PYSELF;
+// @snippet vao-binder-enter
+
+// @snippet vao-binder-exit
+%CPPSELF.release();
+// @snippet vao-binder-exit
diff --git a/sources/pyside6/PySide6/glue/qtpositioning.cpp b/sources/pyside6/PySide6/glue/qtpositioning.cpp
new file mode 100644
index 000000000..91c331c74
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtpositioning.cpp
@@ -0,0 +1,14 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+/*********************************************************************
+ * INJECT CODE
+ ********************************************************************/
+
+// @snippet darwin_location_permission_plugin
+#ifdef Q_OS_DARWIN
+#include<QtCore/qplugin.h>
+// register the static plugin and setup its metadata
+Q_IMPORT_PLUGIN(QDarwinLocationPermissionPlugin)
+#endif
+// @snippet darwin_location_permission_plugin
diff --git a/sources/pyside6/PySide6/glue/qtqml.cpp b/sources/pyside6/PySide6/glue/qtqml.cpp
index 20bcfff45..a56db8de6 100644
--- a/sources/pyside6/PySide6/glue/qtqml.cpp
+++ b/sources/pyside6/PySide6/glue/qtqml.cpp
@@ -62,3 +62,29 @@ return %CONVERTTOPYTHON[%RETURN_TYPE](retval);
// @snippet qmlsingleton
%PYARG_0 = PySide::Qml::qmlSingletonMacro(%ARGUMENT_NAMES);
// @snippet qmlsingleton
+
+// @snippet qqmlengine-singletoninstance-qmltypeid
+QJSValue instance = %CPPSELF.singletonInstance<QJSValue>(%1);
+if (instance.isNull()) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+} else if (instance.isQObject()) {
+ QObject *result = instance.toQObject();
+ %PYARG_0 = %CONVERTTOPYTHON[QObject *](result);
+} else {
+ %PYARG_0 = %CONVERTTOPYTHON[QJSValue](instance);
+}
+// @snippet qqmlengine-singletoninstance-qmltypeid
+
+// @snippet qqmlengine-singletoninstance-typename
+QJSValue instance = %CPPSELF.singletonInstance<QJSValue>(%1, %2);
+if (instance.isNull()) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+} else if (instance.isQObject()) {
+ QObject *result = instance.toQObject();
+ %PYARG_0 = %CONVERTTOPYTHON[QObject *](result);
+} else {
+ %PYARG_0 = %CONVERTTOPYTHON[QJSValue](instance);
+}
+// @snippet qqmlengine-singletoninstance-typename
diff --git a/sources/pyside6/PySide6/glue/qtquick.cpp b/sources/pyside6/PySide6/glue/qtquick.cpp
index 5b127ba24..060418faf 100644
--- a/sources/pyside6/PySide6/glue/qtquick.cpp
+++ b/sources/pyside6/PySide6/glue/qtquick.cpp
@@ -4,3 +4,24 @@
// @snippet qtquick
PySide::initQuickSupport(module);
// @snippet qtquick
+
+// @snippet qsgeometry-vertexdataaspoint2d
+auto *points = %CPPSELF->vertexDataAsPoint2D();
+const Py_ssize_t vertexCount = %CPPSELF->vertexCount();
+%PYARG_0 = PyList_New(vertexCount);
+for (Py_ssize_t i = 0; i < vertexCount; ++i) {
+ QSGGeometry::Point2D p = points[i];
+ PyList_SET_ITEM(%PYARG_0, i, %CONVERTTOPYTHON[QSGGeometry::Point2D](p));
+}
+// @snippet qsgeometry-vertexdataaspoint2d
+
+// @snippet qsgeometry-setvertexdataaspoint2d
+const qsizetype vertexCount = %CPPSELF->vertexCount();
+if (vertexCount != %1.size()) {
+ PyErr_SetString(PyExc_RuntimeError, "size mismatch");
+ return {};
+}
+
+QSGGeometry::Point2D *points = %CPPSELF->vertexDataAsPoint2D();
+std::copy(%1.cbegin(), %1.cend(), points);
+// @snippet qsgeometry-setvertexdataaspoint2d
diff --git a/sources/pyside6/PySide6/glue/qtquicktest.cpp b/sources/pyside6/PySide6/glue/qtquicktest.cpp
new file mode 100644
index 000000000..f41735ddf
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtquicktest.cpp
@@ -0,0 +1,50 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+/*********************************************************************
+ * INJECT CODE
+ ********************************************************************/
+
+// @snippet call-quick-test-main
+static int callQuickTestMain(const QString &name, QObject *setup,
+ QStringList argv, QString dir)
+{
+ if (dir.isEmpty())
+ dir = QDir::currentPath();
+ if (argv.isEmpty())
+ argv.append(name);
+
+ std::vector<QByteArray> argvB;
+ std::vector<char *> argvC;
+ const auto argc = argv.size();
+ argvB.reserve(argc);
+ argvC.reserve(argc);
+ for (const auto &arg : argv) {
+ argvB.emplace_back(arg.toUtf8());
+ argvC.push_back(argvB.back().data());
+ }
+
+ return quick_test_main_with_setup(int(argc), argvC.data(),
+ name.toUtf8().constData(),
+ dir.toUtf8().constData(), setup);
+}
+// @snippet call-quick-test-main
+
+// @snippet quick-test-main
+const int exitCode = callQuickTestMain(%1, nullptr, %2, %3);
+%PYARG_0 = %CONVERTTOPYTHON[int](exitCode);
+// @snippet quick-test-main
+
+// @snippet quick-test-main_with_setup
+Shiboken::AutoDecRef pySetupObject(PyObject_CallObject(reinterpret_cast<PyObject *>(%2), nullptr));
+if (pySetupObject.isNull() || PyErr_Occurred() != nullptr)
+ return nullptr;
+
+/// Convenience to convert a PyObject to QObject
+QObject *setupObject = PySide::convertToQObject(pySetupObject.object(), true /* raiseError */);
+if (setupObject == nullptr)
+ return nullptr;
+
+const int exitCode = callQuickTestMain(%1, setupObject, %3, %4);
+%PYARG_0 = %CONVERTTOPYTHON[int](exitCode);
+// @snippet quick-test-main_with_setup
diff --git a/sources/pyside6/PySide6/glue/qtserialbus.cpp b/sources/pyside6/PySide6/glue/qtserialbus.cpp
new file mode 100644
index 000000000..b5b491f49
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtserialbus.cpp
@@ -0,0 +1,30 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+/*********************************************************************
+ * INJECT CODE
+ ********************************************************************/
+
+// @snippet qcanbus-available-devices
+QString errorMessage;
+const QList<QCanBusDeviceInfo> result = %CPPSELF.%FUNCTION_NAME(%1, &errorMessage);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QList<QCanBusDeviceInfo>](result));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](errorMessage));
+// @snippet qcanbus-available-devices
+
+// @snippet qcanbus-createdevice
+PyObject *pyDevice{};
+QString errorMessage;
+if (auto *device = %CPPSELF.%FUNCTION_NAME(%1, %2, &errorMessage)) {
+ pyDevice = %CONVERTTOPYTHON[%RETURN_TYPE](device);
+ // Ownership transferences (target)
+ Shiboken::Object::getOwnership(pyDevice);
+} else {
+ pyDevice = Py_None;
+ Py_INCREF(pyDevice);
+}
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, pyDevice);
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](errorMessage));
+// @snippet qcanbus-createdevice
diff --git a/sources/pyside6/PySide6/glue/qtstatemachine.cpp b/sources/pyside6/PySide6/glue/qtstatemachine.cpp
index 2d4973a04..098200b14 100644
--- a/sources/pyside6/PySide6/glue/qtstatemachine.cpp
+++ b/sources/pyside6/PySide6/glue/qtstatemachine.cpp
@@ -39,8 +39,9 @@ if (PySide::SignalManager::registerMetaMethod(%1, signalName.constData(),
// since it refers to a name very tied to the generator implementation.
// Check bug #362 for more information on this
// http://bugs.openbossa.org/show_bug.cgi?id=362
+// PYSIDE-2256: The label was removed
if (!PyObject_TypeCheck(%1, PySideSignalInstance_TypeF()))
- goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError;
+ return Shiboken::returnWrongArguments(args, fullName, errInfo);
PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%1);
auto sender = %CONVERTTOCPP[QObject *](PySide::Signal::getObject(signalInstance));
QSignalTransition *%0 = %CPPSELF->%FUNCTION_NAME(sender, PySide::Signal::getSignature(signalInstance),%2);
diff --git a/sources/pyside6/PySide6/glue/qtuitools.cpp b/sources/pyside6/PySide6/glue/qtuitools.cpp
index 9e52436e7..0f4405944 100644
--- a/sources/pyside6/PySide6/glue/qtuitools.cpp
+++ b/sources/pyside6/PySide6/glue/qtuitools.cpp
@@ -62,7 +62,7 @@ Q_IMPORT_PLUGIN(PyCustomWidgets);
// @snippet quiloader-registercustomwidget
registerCustomWidget(%PYARG_1);
-%CPPSELF.addPluginPath(""); // force reload widgets
+%CPPSELF.addPluginPath(QString{}); // force reload widgets
// @snippet quiloader-registercustomwidget
// @snippet quiloader-load-1
@@ -87,38 +87,46 @@ char *arg1 = PyBytes_AsString(strObj);
QByteArray uiFileName(arg1);
Py_DECREF(strObj);
-QFile uiFile(uiFileName);
-
-if (!uiFile.exists()) {
- qCritical().noquote() << "File" << uiFileName << "does not exists";
+if (uiFileName.isEmpty()) {
+ qCritical() << "Error converting the UI filename to QByteArray";
Py_RETURN_NONE;
}
-if (uiFileName.isEmpty()) {
- qCritical() << "Error converting the UI filename to QByteArray";
+QFile uiFile(QString::fromUtf8(uiFileName));
+
+if (!uiFile.exists()) {
+ qCritical().noquote() << "File" << uiFileName << "does not exist";
Py_RETURN_NONE;
}
// Use the 'pyside6-uic' wrapper instead of 'uic'
// This approach is better than rely on 'uic' since installing
// the wheels cover this case.
-QString uicBin("pyside6-uic");
+QString uicBin(QStringLiteral("pyside6-uic"));
QStringList uicArgs = {QString::fromUtf8(uiFileName)};
QProcess uicProcess;
uicProcess.start(uicBin, uicArgs);
-if (!uicProcess.waitForFinished()) {
- qCritical() << "Cannot run 'pyside6-uic': " << uicProcess.errorString() << " - "
- << "Exit status " << uicProcess.exitStatus()
- << " (" << uicProcess.exitCode() << ")\n"
- << "Check if 'pyside6-uic' is in PATH";
+if (!uicProcess.waitForStarted()) {
+ qCritical().noquote() << "Cannot run '" << uicBin << "': "
+ << uicProcess.errorString() << " - Check if 'pyside6-uic' is in PATH";
+ Py_RETURN_NONE;
+}
+
+if (!uicProcess.waitForFinished()
+ || uicProcess.exitStatus() != QProcess::NormalExit
+ || uicProcess.exitCode() != 0) {
+ qCritical().noquote() << '\'' << uicBin << "' failed: "
+ << uicProcess.errorString() << " - Exit status " << uicProcess.exitStatus()
+ << " (" << uicProcess.exitCode() << ")\n";
Py_RETURN_NONE;
}
+
QByteArray uiFileContent = uicProcess.readAllStandardOutput();
QByteArray errorOutput = uicProcess.readAllStandardError();
if (!errorOutput.isEmpty()) {
- qCritical().noquote() << errorOutput;
+ qCritical().noquote() << '\'' << uicBin << "' failed: " << errorOutput;
Py_RETURN_NONE;
}
@@ -142,8 +150,8 @@ QXmlStreamReader reader(&uiFile);
while (!reader.atEnd() && baseClassName.isEmpty() && className.isEmpty()) {
auto token = reader.readNext();
if (token == QXmlStreamReader::StartElement && reader.name() == u"widget") {
- baseClassName = reader.attributes().value(QLatin1String("class")).toUtf8();
- className = reader.attributes().value(QLatin1String("name")).toUtf8();
+ baseClassName = reader.attributes().value(QLatin1StringView("class")).toUtf8();
+ className = reader.attributes().value(QLatin1StringView("name")).toUtf8();
}
}
diff --git a/sources/pyside6/PySide6/glue/qtwebenginecore.cpp b/sources/pyside6/PySide6/glue/qtwebenginecore.cpp
index a569e6c11..76a7c6d73 100644
--- a/sources/pyside6/PySide6/glue/qtwebenginecore.cpp
+++ b/sources/pyside6/PySide6/glue/qtwebenginecore.cpp
@@ -1,36 +1,64 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-// @snippet qwebenginecookiestore-setcookiefilter
-auto callable = %PYARG_1;
-auto callback = [callable](const QWebEngineCookieStore::FilterRequest& filterRequest) -> bool
+// @snippet qwebenginecookiestore-functor
+struct QWebEngineCookieFilterFunctor : public Shiboken::PyObjectHolder
+{
+ using Shiboken::PyObjectHolder::PyObjectHolder;
+
+ bool operator()(const QWebEngineCookieStore::FilterRequest& filterRequest) const;
+};
+
+bool QWebEngineCookieFilterFunctor::operator()(const QWebEngineCookieStore::FilterRequest &
+ filterRequest) const
{
Shiboken::GilState state;
Shiboken::AutoDecRef arglist(PyTuple_New(1));
PyTuple_SET_ITEM(arglist, 0,
- %CONVERTTOPYTHON[QWebEngineCookieStore::FilterRequest](filterRequest));
- Py_INCREF(callable);
- PyObject* ret = PyObject_CallObject(callable, arglist);
- Py_DECREF(callable);
- return ret;
+ %CONVERTTOPYTHON[QWebEngineCookieStore::FilterRequest](filterRequest));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(object(), arglist));
+ return ret.object() == Py_True;
+}
+// @snippet qwebenginecookiestore-functor
-};
-%CPPSELF.%FUNCTION_NAME(callback);
+// @snippet qwebenginecookiestore-setcookiefilter
+%CPPSELF.%FUNCTION_NAME(QWebEngineCookieFilterFunctor(%PYARG_1));
// @snippet qwebenginecookiestore-setcookiefilter
-// @snippet qwebengineprofile-setnotificationpresenter
-auto callable = %PYARG_1;
-auto callback = [callable](std::unique_ptr<QWebEngineNotification> webEngineNotification) -> void
+// @snippet qwebengineprofile-functor
+struct QWebEngineNotificationFunctor : public Shiboken::PyObjectHolder
+{
+ using Shiboken::PyObjectHolder::PyObjectHolder;
+
+ void operator()(std::unique_ptr<QWebEngineNotification> webEngineNotification);
+};
+
+void QWebEngineNotificationFunctor::operator()
+ (std::unique_ptr<QWebEngineNotification> webEngineNotification)
{
Shiboken::GilState state;
Shiboken::AutoDecRef arglist(PyTuple_New(1));
+ auto *notification = webEngineNotification.release();
PyTuple_SET_ITEM(arglist.object(), 0,
- Shiboken::Conversions::pointerToPython(
- SbkPySide6_QtWebEngineCoreTypes[SBK_QWEBENGINENOTIFICATION_IDX],
- webEngineNotification.release()));
- Py_INCREF(callable);
- PyObject_CallObject(callable, arglist);
- Py_DECREF(callable);
+ %CONVERTTOPYTHON[QWebEngineNotification*](notification));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(object(), arglist));
};
-%CPPSELF.%FUNCTION_NAME(callback);
+// @snippet qwebengineprofile-functor
+
+// @snippet qwebengineprofile-setnotificationpresenter
+%CPPSELF.%FUNCTION_NAME(QWebEngineNotificationFunctor(%PYARG_1));
// @snippet qwebengineprofile-setnotificationpresenter
+
+// @snippet qwebenginepage-javascriptprompt-virtual-redirect
+std::pair<bool, QString> resultPair = javaScriptPromptPyOverride(gil, pyOverride.object(), securityOrigin, msg, defaultValue);
+result->assign(resultPair.second);
+return resultPair.first;
+// @snippet qwebenginepage-javascriptprompt-virtual-redirect
+
+// @snippet qwebenginepage-javascriptprompt-return
+QString str;
+%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, &str);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](str));
+// @snippet qwebenginepage-javascriptprompt-return
diff --git a/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp b/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp
index 8fdd6b693..af15130a4 100644
--- a/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp
@@ -55,8 +55,8 @@ auto callback = [callable](const QString &text)
PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QString](text));
Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
Py_DECREF(callable);
-
};
+
Py_INCREF(callable);
%CPPSELF.%FUNCTION_NAME(callback);
// @snippet qwebenginepage-convertto
@@ -95,8 +95,8 @@ auto callback = [callable](const QVariant &result)
// PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[bool](found));
Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
Py_DECREF(callable);
-
};
+
Py_INCREF(callable);
%CPPSELF.%FUNCTION_NAME(%1, %2, callback);
// @snippet qwebenginepage-runjavascript
@@ -114,8 +114,8 @@ auto callback = [callable](const QByteArray &pdf)
PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QByteArray](pdf));
Shiboken::AutoDecRef ret(PyObject_CallObject(callable, arglist));
Py_DECREF(callable);
-
};
+
Py_INCREF(callable);
%CPPSELF.%FUNCTION_NAME(callback, %2);
// @snippet qwebenginepage-printtopdf
diff --git a/sources/pyside6/PySide6/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp
index f20b0d3ad..1b3e94016 100644
--- a/sources/pyside6/PySide6/glue/qtwidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwidgets.cpp
@@ -20,7 +20,8 @@ Shiboken::Object::releaseOwnership(%PYARG_0);
// @snippet qgraphicsitem
PyObject *userTypeConstant = PyLong_FromLong(QGraphicsItem::UserType);
-PyDict_SetItemString(Sbk_QGraphicsItem_TypeF()->tp_dict, "UserType", userTypeConstant);
+tpDict.reset(PepType_GetDict(Sbk_QGraphicsItem_TypeF()));
+PyDict_SetItemString(tpDict.object(), "UserType", userTypeConstant);
// @snippet qgraphicsitem
// @snippet qgraphicsitem-scene-return-parenting
@@ -60,6 +61,11 @@ QFormLayout::ItemRole _role;
%CPPSELF->%FUNCTION_NAME(%ARGUMENT_NAMES, &_row, &_role);
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](_row));
+// On the C++ side, *rolePtr is not set if row == -1, in which case on
+// the Python side this gets converted to a random value outside the
+// enum range. Fix this by setting _role to a default value here.
+if (_row == -1)
+ _role = QFormLayout::LabelRole;
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QFormLayout::ItemRole](_role));
// @snippet qformlayout-fix-args
@@ -69,7 +75,7 @@ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QFormLayout::ItemRole](_role));
%END_ALLOW_THREADS
%PYARG_0 = PyTuple_New(2);
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
-PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG5_TYPE](%5));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](%5));
// @snippet qfiledialog-return
// @snippet qwidget-addaction-glue
@@ -208,11 +214,24 @@ if (_widget) {
// @snippet qtoolbox-removeitem
// @snippet qlayout-help-functions
+#ifndef _QLAYOUT_HELP_FUNCTIONS_
+#define _QLAYOUT_HELP_FUNCTIONS_ // Guard for jumbo builds
+
+static const char msgInvalidParameterAdd[] =
+ "Invalid parameter None passed to addLayoutOwnership().";
+static const char msgInvalidParameterRemoval[] =
+ "Invalid parameter None passed to removeLayoutOwnership().";
+
void addLayoutOwnership(QLayout *layout, QLayoutItem *item);
void removeLayoutOwnership(QLayout *layout, QWidget *widget);
inline void addLayoutOwnership(QLayout *layout, QWidget *widget)
{
+ if (layout == nullptr || widget == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterAdd);
+ return;
+ }
+
//transfer ownership to parent widget
QWidget *lw = layout->parentWidget();
QWidget *pw = widget->parentWidget();
@@ -239,6 +258,11 @@ inline void addLayoutOwnership(QLayout *layout, QWidget *widget)
inline void addLayoutOwnership(QLayout *layout, QLayout *other)
{
+ if (layout == nullptr || other == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterAdd);
+ return;
+ }
+
//transfer all children widgets from other to layout parent widget
QWidget *parent = layout->parentWidget();
if (!parent) {
@@ -265,8 +289,11 @@ inline void addLayoutOwnership(QLayout *layout, QLayout *other)
inline void addLayoutOwnership(QLayout *layout, QLayoutItem *item)
{
- if (!item)
+
+ if (layout == nullptr || item == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterAdd);
return;
+ }
if (QWidget *w = item->widget()) {
addLayoutOwnership(layout, w);
@@ -282,6 +309,11 @@ inline void addLayoutOwnership(QLayout *layout, QLayoutItem *item)
static void removeWidgetFromLayout(QLayout *layout, QWidget *widget)
{
+ if (layout == nullptr || widget == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterRemoval);
+ return;
+ }
+
if (QWidget *parent = widget->parentWidget()) {
//give the ownership to parent
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget *](parent));
@@ -299,6 +331,11 @@ static void removeWidgetFromLayout(QLayout *layout, QWidget *widget)
inline void removeLayoutOwnership(QLayout *layout, QLayoutItem *item)
{
+ if (layout == nullptr || item == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterRemoval);
+ return;
+ }
+
if (QWidget *w = item->widget()) {
removeWidgetFromLayout(layout, w);
} else {
@@ -314,8 +351,10 @@ inline void removeLayoutOwnership(QLayout *layout, QLayoutItem *item)
inline void removeLayoutOwnership(QLayout *layout, QWidget *widget)
{
- if (!widget)
+ if (layout == nullptr || widget == nullptr) {
+ PyErr_SetString(PyExc_RuntimeError, msgInvalidParameterRemoval);
return;
+ }
for (int i = 0, i_max = layout->count(); i < i_max; ++i) {
QLayoutItem *item = layout->itemAt(i);
@@ -325,15 +364,17 @@ inline void removeLayoutOwnership(QLayout *layout, QWidget *widget)
removeLayoutOwnership(layout, item);
}
}
+#endif // _QLAYOUT_HELP_FUNCTIONS_
// @snippet qlayout-help-functions
// @snippet qlayout-setalignment
%CPPSELF.setAlignment(%1);
// @snippet qlayout-setalignment
-// @snippet addownership-0
-addLayoutOwnership(%CPPSELF, %0);
-// @snippet addownership-0
+// @snippet addownership-item-at
+if (%0 != nullptr)
+ addLayoutOwnership(%CPPSELF, %0);
+// @snippet addownership-item-at
// @snippet addownership-1
addLayoutOwnership(%CPPSELF, %1);
@@ -380,7 +421,7 @@ Shiboken::BindingManager &bm = Shiboken::BindingManager::instance();
for (auto *item : items) {
SbkObject *obj = bm.retrieveWrapper(item);
if (obj) {
- if (reinterpret_cast<PyObject *>(obj)->ob_refcnt > 1) // If the refcnt is 1 the object will vannish anyway.
+ if (Py_REFCNT(reinterpret_cast<PyObject *>(obj)) > 1) // If the refcnt is 1 the object will vannish anyway.
Shiboken::Object::invalidate(obj);
Shiboken::Object::removeParent(obj);
}
@@ -429,11 +470,14 @@ for (int i = 0, count = %CPPSELF.count(); i < count; ++i) {
// @snippet qlistwidget-clear
// @snippet qwidget-retrieveobjectname
+#ifndef _RETRIEVEOBJECTNAME_
+#define _RETRIEVEOBJECTNAME_ // Guard for jumbo builds
static QByteArray retrieveObjectName(PyObject *obj)
{
Shiboken::AutoDecRef objName(PyObject_Str(obj));
return Shiboken::String::toCString(objName);
}
+#endif
// @snippet qwidget-retrieveobjectname
// @snippet qwidget-glue
@@ -503,15 +547,20 @@ Shiboken::Object::keepReference(reinterpret_cast<SbkObject *>(%PYSELF), "__style
// @snippet qwidget-style
QStyle *myStyle = %CPPSELF->style();
if (myStyle && qApp) {
-%PYARG_0 = %CONVERTTOPYTHON[QStyle *](myStyle);
+ bool keepReference = true;
+ %PYARG_0 = %CONVERTTOPYTHON[QStyle *](myStyle);
QStyle *appStyle = qApp->style();
if (appStyle == myStyle) {
Shiboken::AutoDecRef pyApp(%CONVERTTOPYTHON[QApplication *](qApp));
- Shiboken::Object::setParent(pyApp, %PYARG_0);
- Shiboken::Object::releaseOwnership(%PYARG_0);
- } else {
- Shiboken::Object::keepReference(reinterpret_cast<SbkObject *>(%PYSELF), "__style__", %PYARG_0);
+ // Do not set parentship when qApp is embedded
+ if (Shiboken::Object::wasCreatedByPython(reinterpret_cast<SbkObject *>(pyApp.object()))) {
+ Shiboken::Object::setParent(pyApp, %PYARG_0);
+ Shiboken::Object::releaseOwnership(%PYARG_0);
+ keepReference = false;
+ }
}
+ if (keepReference)
+ Shiboken::Object::keepReference(reinterpret_cast<SbkObject *>(%PYSELF), "__style__", %PYARG_0);
}
// @snippet qwidget-style
@@ -607,7 +656,7 @@ for (auto *act : actions) {
}
%CPPSELF.clear();
-for (auto *obj : qAsConst(lst)) {
+for (auto *obj : std::as_const(lst)) {
Shiboken::Object::invalidate(reinterpret_cast<SbkObject *>(obj));
Py_XDECREF(obj);
}
@@ -690,49 +739,49 @@ const char *styleOptionType(const QStyleOption *o)
case QStyleOption::SO_Default:
break;
case QStyleOption::SO_FocusRect:
- return "StyleOptionFocusRect";
+ return "QStyleOptionFocusRect";
case QStyleOption::SO_Button:
- return "StyleOptionButton";
+ return "QStyleOptionButton";
case QStyleOption::SO_Tab:
- return "StyleOptionTab";
+ return "QStyleOptionTab";
case QStyleOption::SO_MenuItem:
- return "StyleOptionMenuItem";
+ return "QStyleOptionMenuItem";
case QStyleOption::SO_Frame:
- return "StyleOptionFrame";
+ return "QStyleOptionFrame";
case QStyleOption::SO_ProgressBar:
- return "StyleOptionProgressBar";
+ return "QStyleOptionProgressBar";
case QStyleOption::SO_ToolBox:
- return "StyleOptionToolBox";
+ return "QStyleOptionToolBox";
case QStyleOption::SO_Header:
- return "StyleOptionHeader";
+ return "QStyleOptionHeader";
case QStyleOption::SO_DockWidget:
- return "StyleOptionDockWidget";
+ return "QStyleOptionDockWidget";
case QStyleOption::SO_ViewItem:
- return "StyleOptionViewItem";
+ return "QStyleOptionViewItem";
case QStyleOption::SO_TabWidgetFrame:
- return "StyleOptionTabWidgetFrame";
+ return "QStyleOptionTabWidgetFrame";
case QStyleOption::SO_TabBarBase:
- return "StyleOptionTabBarBase";
+ return "QStyleOptionTabBarBase";
case QStyleOption::SO_RubberBand:
- return "StyleOptionRubberBand";
+ return "QStyleOptionRubberBand";
case QStyleOption::SO_ToolBar:
- return "StyleOptionToolBar";
+ return "QStyleOptionToolBar";
case QStyleOption::SO_GraphicsItem:
- return "StyleOptionGraphicsItem";
+ return "QStyleOptionGraphicsItem";
case QStyleOption::SO_Slider:
- return "StyleOptionSlider";
+ return "QStyleOptionSlider";
case QStyleOption::SO_SpinBox:
- return "StyleOptionSpinBox";
+ return "QStyleOptionSpinBox";
case QStyleOption::SO_ToolButton:
- return "StyleOptionToolButton";
+ return "QStyleOptionToolButton";
case QStyleOption::SO_ComboBox:
- return "StyleOptionComboBox";
+ return "QStyleOptionComboBox";
case QStyleOption::SO_TitleBar:
- return "StyleOptionTitleBar";
+ return "QStyleOptionTitleBar";
case QStyleOption::SO_GroupBox:
- return "StyleOptionGroupBox";
+ return "QStyleOptionGroupBox";
case QStyleOption::SO_SizeGrip:
- return "StyleOptionSizeGrip";
+ return "QStyleOptionSizeGrip";
default:
break;
}
@@ -740,6 +789,28 @@ const char *styleOptionType(const QStyleOption *o)
}
// @snippet qstyleoption-typename
+// @snippet qwizardpage-registerfield
+auto *signalInst = reinterpret_cast<PySideSignalInstance *>(%PYARG_4);
+const auto data = PySide::Signal::getEmitterData(signalInst);
+if (data.methodIndex == -1) {
+ PyErr_SetString(PyExc_RuntimeError, "QWizardPage::registerField(): Unable to retrieve signal emitter.");
+ return nullptr;
+}
+const auto method = data.emitter->metaObject()->method(data.methodIndex);
+const QByteArray signature = QByteArrayLiteral("2") + method.methodSignature();
+%BEGIN_ALLOW_THREADS
+%CPPSELF.%FUNCTION_NAME(%1, %2, %3, signature.constData());
+%END_ALLOW_THREADS
+// @snippet qwizardpage-registerfield
+
+// The constructor heuristics generate setting a parent-child relationship
+// when creating a QDialog with parent. This causes the dialog to leak
+// when it synchronous exec() is used instead of asynchronous show().
+// In that case, remove the parent-child relationship.
+// @snippet qdialog-exec-remove-parent-relation
+Shiboken::Object::removeParent(reinterpret_cast<SbkObject *>(%PYSELF));
+// @snippet qdialog-exec-remove-parent-relation
+
/*********************************************************************
* CONVERSIONS
********************************************************************/
diff --git a/sources/pyside6/PySide6/pysidewtypes.h b/sources/pyside6/PySide6/pysidewtypes.h
index 4e6cf8263..f853949ac 100644
--- a/sources/pyside6/PySide6/pysidewtypes.h
+++ b/sources/pyside6/PySide6/pysidewtypes.h
@@ -4,12 +4,12 @@
#ifndef __PYSIDEWTYPES__
#define __PYSIDEWTYPES__
-typedef struct HWND__ *HWND;
-typedef unsigned UINT;
-typedef long LONG;
-typedef unsigned long DWORD;
-typedef UINT WPARAM;
-typedef LONG LPARAM;
+using HWND = struct HWND__ *;
+using UINT = unsigned;
+using LONG = long;
+using DWORD = unsigned long;
+using WPARAM = UINT;
+using LPARAM = LONG;
struct POINT
{
diff --git a/sources/pyside6/PySide6/qiopipe.h b/sources/pyside6/PySide6/qiopipe.h
new file mode 100644
index 000000000..6a325f184
--- /dev/null
+++ b/sources/pyside6/PySide6/qiopipe.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QIOPIPE_H
+#define QIOPIPE_H
+
+#include <QtCore/qiodevicebase.h>
+#include <QtCore/qobject.h>
+
+QT_BEGIN_NAMESPACE
+
+class QIODevice;
+
+namespace QtCoreHelper
+{
+
+class QIOPipePrivate;
+class QIOPipe : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QIOPipe)
+
+public:
+ QIOPipe(QObject *parent = nullptr);
+
+ bool open(QIODeviceBase::OpenMode mode);
+
+ QIODevice *end1() const;
+ QIODevice *end2() const;
+};
+
+} // namespace QtCoreHelper
+
+QT_END_NAMESPACE
+
+#endif // QIOPIPE_H
diff --git a/sources/pyside6/PySide6/qpydesignerextensions.h b/sources/pyside6/PySide6/qpydesignerextensions.h
index 04764c9a4..871fa8284 100644
--- a/sources/pyside6/PySide6/qpydesignerextensions.h
+++ b/sources/pyside6/PySide6/qpydesignerextensions.h
@@ -21,6 +21,10 @@ Q_DECLARE_INTERFACE(QDesignerTaskMenuExtension, "org.qt-project.Qt.Designer.Task
Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface, "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
#endif
+struct _object; // PyObject
+
+QT_BEGIN_NAMESPACE
+
// Extension implementations need to inherit QObject which cannot be done in Python.
// Provide a base class (cf QPyTextObject).
@@ -56,8 +60,6 @@ public:
explicit QPyDesignerTaskMenuExtension(QObject *parent = nullptr) : QObject(parent) {}
};
-struct _object; // PyObject
-
class QPyDesignerCustomWidgetCollection : public QDesignerCustomWidgetCollectionInterface
{
public:
@@ -77,4 +79,6 @@ private:
QList<QDesignerCustomWidgetInterface *> m_customWidgets;
};
+QT_END_NAMESPACE
+
#endif // QPYDESIGNEREXTENSIONS_H
diff --git a/sources/pyside6/PySide6/qpyqmlparserstatus.h b/sources/pyside6/PySide6/qpyqmlparserstatus.h
index 897ebfb5e..24dcdda75 100644
--- a/sources/pyside6/PySide6/qpyqmlparserstatus.h
+++ b/sources/pyside6/PySide6/qpyqmlparserstatus.h
@@ -11,6 +11,8 @@
Q_DECLARE_INTERFACE(QQmlParserStatus, "org.qt-project.Qt.QQmlParserStatus")
#endif
+QT_BEGIN_NAMESPACE
+
// Inherit from QObject such that QQmlParserStatus can be found at
// a fixed offset (RegisterType::parserStatusCast).
class QPyQmlParserStatus : public QObject, public QQmlParserStatus
@@ -21,4 +23,6 @@ public:
explicit QPyQmlParserStatus(QObject *parent = nullptr) : QObject(parent) {}
};
+QT_END_NAMESPACE
+
#endif // QPYQMLPARSERSTATUS_H
diff --git a/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h b/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
index 8e8fc24c1..0b6a0b95c 100644
--- a/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
+++ b/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
@@ -10,6 +10,8 @@
Q_DECLARE_INTERFACE(QQmlPropertyValueSource, "org.qt-project.Qt.QQmlPropertyValueSource")
#endif
+QT_BEGIN_NAMESPACE
+
// Inherit from QObject such that QQmlPropertyValueSource can be found at
// a fixed offset (RegisterType::valueSourceCast).
class QPyQmlPropertyValueSource : public QObject, public QQmlPropertyValueSource
@@ -20,4 +22,6 @@ public:
explicit QPyQmlPropertyValueSource(QObject *parent = nullptr) : QObject(parent) {}
};
+QT_END_NAMESPACE
+
#endif // QPYQMLPROPERTYVALUESOURCE_H
diff --git a/sources/pyside6/PySide6/qpytextobject.h b/sources/pyside6/PySide6/qpytextobject.h
index c667b2980..45bb0bd52 100644
--- a/sources/pyside6/PySide6/qpytextobject.h
+++ b/sources/pyside6/PySide6/qpytextobject.h
@@ -13,6 +13,7 @@
Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
#endif
+QT_BEGIN_NAMESPACE
class QPyTextObject : public QObject, public QTextObjectInterface
{
Q_OBJECT
@@ -20,6 +21,8 @@ class QPyTextObject : public QObject, public QTextObjectInterface
public:
QPyTextObject(QObject *parent = nullptr) : QObject(parent) {}
};
+QT_END_NAMESPACE
+
#endif
diff --git a/sources/pyside6/PySide6/qtcorehelper.h b/sources/pyside6/PySide6/qtcorehelper.h
index 8ce18444b..589d0b295 100644
--- a/sources/pyside6/PySide6/qtcorehelper.h
+++ b/sources/pyside6/PySide6/qtcorehelper.h
@@ -4,15 +4,17 @@
#ifndef QTCOREHELPER_H
#define QTCOREHELPER_H
-#include <QtCore/qsharedpointer.h>
#include <QtCore/qmutex.h>
#include <QtCore/qobjectdefs.h>
+#include <memory>
+
+QT_BEGIN_NAMESPACE
namespace QtCoreHelper {
- using MutexLocker = QMutexLocker<QMutex>;
- using RecursiveMutexLocker = QMutexLocker<QRecursiveMutex>;
+ using MutexLocker = QT_PREPEND_NAMESPACE(QMutexLocker<QMutex>);
+ using RecursiveMutexLocker = QT_PREPEND_NAMESPACE(QMutexLocker<QRecursiveMutex>);
// ::QMutexLocker is a template with the QMutex class as parameter which can
// only be represented by different type names in Python. Provide a common API.
@@ -82,13 +84,13 @@ namespace QtCoreHelper {
QGenericArgumentHolder &operator=(QGenericArgumentHolder &&);
~QGenericArgumentHolder();
- operator QGenericArgument () const;
+ QGenericArgument toGenericArgument() const;
QMetaType metaType() const;
const void *data() const;
private:
- QSharedPointer<QGenericArgumentData> d;
+ std::shared_ptr<QGenericArgumentData> d;
};
class QGenericReturnArgumentData;
@@ -104,15 +106,17 @@ namespace QtCoreHelper {
QGenericReturnArgumentHolder &operator=(QGenericReturnArgumentHolder &&);
~QGenericReturnArgumentHolder();
- operator QGenericReturnArgument () const;
+ QGenericReturnArgument toGenericReturnArgument() const;
QMetaType metaType() const;
const void *data() const;
private:
- QSharedPointer<QGenericReturnArgumentData> d;
+ std::shared_ptr<QGenericReturnArgumentData> d;
};
} // namespace QtCoreHelper
+QT_END_NAMESPACE
+
#endif // QTCOREHELPER_H
diff --git a/sources/pyside6/PySide6/qtdbushelper.h b/sources/pyside6/PySide6/qtdbushelper.h
index b59d2db9c..7389ad815 100644
--- a/sources/pyside6/PySide6/qtdbushelper.h
+++ b/sources/pyside6/PySide6/qtdbushelper.h
@@ -8,6 +8,7 @@
#include <QtDBus/qdbuspendingcall.h>
#include <QtDBus/qdbusreply.h>
+QT_BEGIN_NAMESPACE
namespace QtDBusHelper {
// A Python-bindings friendly, non-template QDBusReply
@@ -56,4 +57,6 @@ inline QDBusReply::QDBusReply() = default;
} // namespace QtDBusHelper
+QT_END_NAMESPACE
+
#endif // QTDBUSHELPER_H
diff --git a/sources/pyside6/PySide6/qtgraphs_helper.h b/sources/pyside6/PySide6/qtgraphs_helper.h
new file mode 100644
index 000000000..726f5fb37
--- /dev/null
+++ b/sources/pyside6/PySide6/qtgraphs_helper.h
@@ -0,0 +1,19 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QTGRAPHS_HELPER_H
+#define QTGRAPHS_HELPER_H
+
+#include <sbkpython.h>
+
+#include <QtGraphs/QSurfaceDataProxy>
+#include <QtCore/QList>
+
+namespace QtGraphsHelper {
+
+QSurfaceDataArray surfaceDataFromNp(double x, double deltaX, double z, double deltaZ,
+ PyObject *data);
+
+} // namespace QtGraphsHelper
+
+#endif // QTGRAPHS_HELPER_H
diff --git a/sources/pyside6/PySide6/qtguihelper.h b/sources/pyside6/PySide6/qtguihelper.h
index 3b4b659fa..e537cfefa 100644
--- a/sources/pyside6/PySide6/qtguihelper.h
+++ b/sources/pyside6/PySide6/qtguihelper.h
@@ -6,6 +6,7 @@
#include <QtGui/QGuiApplication>
+QT_BEGIN_NAMESPACE
namespace QtGuiHelper {
class QOverrideCursorGuard
@@ -14,7 +15,7 @@ namespace QtGuiHelper {
Q_DISABLE_COPY_MOVE(QOverrideCursorGuard)
QOverrideCursorGuard() = default;
- ~QOverrideCursorGuard() { restoreOverrideCursor(); }
+ ~QOverrideCursorGuard() = default;
void restoreOverrideCursor()
{
@@ -29,5 +30,6 @@ namespace QtGuiHelper {
};
} // namespace QtGuiHelper
+QT_END_NAMESPACE
#endif // QTGUIHELPER_H
diff --git a/sources/pyside6/PySide6/support/deprecated.py b/sources/pyside6/PySide6/support/deprecated.py
index 272e01967..263dd3ed7 100644
--- a/sources/pyside6/PySide6/support/deprecated.py
+++ b/sources/pyside6/PySide6/support/deprecated.py
@@ -15,27 +15,4 @@ Note that this fixing code is run after all initializations, but before the
import is finished. But that is no problem since the module is passed in.
"""
-import warnings
-from textwrap import dedent
-
-
-class PySideDeprecationWarningRemovedInQt6(Warning):
- pass
-
-
-def constData(self):
- cls = self.__class__
- name = cls.__qualname__
- warnings.warn(dedent(f"""
- {name}.constData is unpythonic and will be removed in Qt For Python 6.0 .
- Please use {name}.data instead."""), PySideDeprecationWarningRemovedInQt6, stacklevel=2)
- return cls.data(self)
-
-
-# No longer needed but kept for reference.
-def _unused_fix_for_QtGui(QtGui):
- for name, cls in QtGui.__dict__.items():
- if name.startswith("QMatrix") and "data" in cls.__dict__:
- cls.constData = constData
-
# eof
diff --git a/sources/pyside6/PySide6/support/generate_pyi.py b/sources/pyside6/PySide6/support/generate_pyi.py
index 5a2cf05ee..92808e2a5 100644
--- a/sources/pyside6/PySide6/support/generate_pyi.py
+++ b/sources/pyside6/PySide6/support/generate_pyi.py
@@ -8,14 +8,14 @@ This script generates the .pyi files for all PySide modules.
"""
import argparse
-import inspect
+import inspect # noqa: F401
import logging
import os
import sys
-import typing
+import typing # noqa: F401
from pathlib import Path
-from types import SimpleNamespace
+from types import SimpleNamespace # noqa: F401
# Can we use forward references?
USE_PEP563 = sys.version_info[:2] >= (3, 7)
@@ -25,7 +25,7 @@ def generate_all_pyi(outpath, options):
ps = os.pathsep
if options.sys_path:
# make sure to propagate the paths from sys_path to subprocesses
- normpath = lambda x: os.fspath(Path(x).resolve())
+ normpath = lambda x: os.fspath(Path(x).resolve()) # noqa: E731
sys_path = [normpath(_) for _ in options.sys_path]
sys.path[0:0] = sys_path
pypath = ps.join(sys_path)
@@ -63,15 +63,16 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="This script generates the .pyi file for all PySide modules.")
parser.add_argument("modules", nargs="+",
- help="'all' or the names of modules to build (QtCore QtGui etc.)")
+ help="'all' or the names of modules to build (QtCore QtGui etc.)")
parser.add_argument("--quiet", action="store_true", help="Run quietly")
- parser.add_argument("--check", action="store_true", help="Test the output if on Python 3")
parser.add_argument("--outpath",
- help="the output directory (default = binary location)")
+ help="the output directory (default = binary location)")
parser.add_argument("--sys-path", nargs="+",
- help="a list of strings prepended to sys.path")
+ help="a list of strings prepended to sys.path")
parser.add_argument("--feature", nargs="+", choices=["snake_case", "true_property"], default=[],
- help="""a list of feature names. Example: `--feature snake_case true_property`""")
+ help="""a list of feature names. """
+ """Example: `--feature snake_case true_property`. """
+ """Currently not available for PyPy.""")
options = parser.parse_args()
qtest_env = os.environ.get("QTEST_ENVIRONMENT", "")
diff --git a/sources/pyside6/PySide6/templates/core_common.xml b/sources/pyside6/PySide6/templates/core_common.xml
index 525e72643..07bafc6ff 100644
--- a/sources/pyside6/PySide6/templates/core_common.xml
+++ b/sources/pyside6/PySide6/templates/core_common.xml
@@ -284,13 +284,4 @@
}
</template>
- <template name="pydatetime_importandcheck_function">
- static bool PyDateTime_ImportAndCheck(PyObject *pyIn)
- {
- if (!PyDateTimeAPI)
- PyDateTime_IMPORT;
- return $DATETIMETYPE_Check(pyIn);
- }
- </template>
-
</typesystem>
diff --git a/sources/pyside6/PySide6/templates/gui_common.xml b/sources/pyside6/PySide6/templates/gui_common.xml
index 94538dd63..6a7404507 100644
--- a/sources/pyside6/PySide6/templates/gui_common.xml
+++ b/sources/pyside6/PySide6/templates/gui_common.xml
@@ -8,7 +8,7 @@
int size = Shiboken::String::len(%PYARG_1);
if (size == 1) {
const char *str = Shiboken::String::toCString(%PYARG_1);
- QChar ch(str[0]);
+ const QChar ch(static_cast&lt;unsigned short&gt;(str[0]));
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(ch);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
} else {
@@ -93,15 +93,6 @@
}
</template>
- <template name="qkeysequence_repr">
- QString result;
- QDebug debug(&amp;result);
- debug.noquote();
- debug.nospace();
- debug &lt;&lt; (*%CPPSELF);
- %PYARG_0 = Shiboken::String::fromCString(result.toUtf8().constData());
- </template>
-
<template name="validator_conversionrule">
QValidator::State %out;